• Name of Teacher- Miss Bargale Nita N.
• [Link] C.S(Entire) –III
• sem- V
• Sub- Java Programming
Unit-1 History of Java
•Java team members (also known asGreen Team), initiated a
revolutionary task to develop a language for digital devices such as
set-top boxes, televisions etc.
•James Gosling, Mike Sheridan, and Patrick Naughton initiated the
Java language project in June 1991. The small team of sun engineers
called Green Team.
• Originally designed for small, embedded systems in electronic
appliances like set-top boxes.
• it was called Oak and was developed as a part of the Green project
•Oak is a symbol of strength and choosen as a national tree of many
countries like U.S.A., France, Germany, Romania etc.
• In 1995, Oak was renamed as"Java" because it was already a
trademark by Oak Technologies.
• Java is an island of Indonesia where first coffee was produced
(called java coffee).
• Notice that Java is just a name not an acronym.
• Originally developed by James Gosling at Sun Microsystems (which
is now a subsidiary of Oracle Corporation) and released in 1995.
• There are many java versions that has been released.
• JDK Alpha and Beta (1995)
• JDK 1.0 (23rd Jan, 1996)
• JDK 1.1 (19th Feb, 1997)
• J2SE 1.2 (8th Dec, 1998)
• J2SE 1.3 (8th May, 2000)
• J2SE 1.4 (6th Feb, 2002)
• J2SE 5.0 (30th Sep, 2004)
• Java SE 6 (11th Dec, 2006)
• Java SE 7 (28th July, 2011)
• Java SE 8 (18th March, 2014)
• Java SE 9 (September 2017)
• Java SE 10(March 2018)
• Java SE 11 (LTS)(September 2019)
• Java SE 12(March 2019)
• java SE 13(September 2019)
• Java SE 14(March 2020)
What is Java
Java is a high level, robust, secured and object oriented
programming language.
Java is platform independent
Platform: Any hardware or software environment in which a
program runs, is known as a platform. Since Java has its own
runtime environment (JRE) and API, it is called platform.
Where it is used?
• According to Sun, 3 billion devices run java. There are
many devices where java is currently used. Some of
them are as follows:
• Desktop Applications such as acrobat reader, media
player, antivirus etc.
• Web Applications such as [Link], [Link]
etc.
• Enterprise Applications such as banking applications.
• Mobile • Embedded System
• Smart Card • Robotics • Games etc.
Types of Java Applications
There are mainly 4 type of applications that can be created using java
programming:
• 1) Standalone Application -It is also known as desktop application or
window-based application. An application that we need to install on
every machine such as media player, antivirus etc. AWT and Swing
are used in java for creating standalone applications.
• 2) Web Application -An application that runs on the server side and
creates dynamic page, is called web application. Currently, servlet,
jsp, struts, jsf etc. technologies are used for creating web
applications in java.
• 3) Enterprise Application -An application that is distributed in
nature, such as banking applications etc. It has the advantage of
high level security, load balancing and clustering. In java, EJB is used
for creating enterprise applications.
• 4) Mobile Application-An application that is created for mobile
devices. Currently Android and Java ME are used for creating
mobile applications.
FEAUTURES OF JAVA TECHNOLOGY
1 PLATFORM INDEPENDENT: – Write once run anywhere
2 Simple-syntax is based on c++,removed many confusing and/or rarely
used features e.g. explicit pointer, operator overloading etc.
•3 OBECT ORIENTED: – No coding outside of class definitions including
main () – An extensive class library available in the core language packages
4 COMPILER AND INTERPRETER: – Code is compiled to byte codes that
are interpreted by a JVM – This provides portability to any machine for
which a virtual machine has been written
5 The two steps of compilation and interpretation allow for extensive code
checking and improved security
[Link]: – Exception handling built-in strong type checking
[Link] MEMORY MANAGEMENT: – Automatic garbage
collection memory management handled by the JVM
8. SECURITY: – No memory pointers – Programs run inside the virtual machine
sandbox
[Link] –java is designed as distributed language for creating
application on networks
JVM
• JVM (Java Virtual Machine) is an abstract machine.
• It is called a virtual machine because it doesn't physically
exist.
• It is a specification that provides a runtime environment in
which Java bytecode can be executed.
• It can also run those programs which are written in other
languages and compiled to Java bytecode.
• JVMs are available for many hardware and
software platforms.
• JVM, JRE, and JDK are platform dependent
because the configuration of each OS is
different from each other. However, Java is
platform independent.
The JVM performs the following main tasks:
• Loads code
• Verifies code
• Executes code
• Provides runtime environment
JRE
• JRE is an acronym for Java Runtime
Environment.
• It is also written as Java RTE.
• The Java Runtime Environment is a set of
software tools which are used for developing
Java applications.
• It is used to provide the runtime
environment. It physically exists. It contains a
set of libraries + other files that JVM uses at
runtime.
Set of libraries
JVM
other files
JRE
JDK
• JDK is an acronym for Java Development Kit. The Java Development Kit (JDK) is a
software development environment which is used to develop Java applications
and applets. It physically exists. It contains JRE + development tools.
• JDK is an implementation of any one of the below given Java Platforms released by
Oracle Corporation:
• Standard Edition Java Platform
• Enterprise Edition Java Platform
• Micro Edition Java Platform
• The JDK contains a private Java Virtual Machine (JVM) and a few other resources
such as an interpreter/loader (java), a compiler (javac), an archiver (jar), a
documentation generator (Javadoc), etc. to complete the development of a Java
Application.
Set of libraries
DEVLOPMENT TOOLS
Javac,java etc
JVM
other files
JRE
JDK
How JVM Works – JVM Architecture?
•JVM(Java Virtual Machine) acts as a run-time engine to run Java
applications. JVM is the one that actually calls the main method present
in a java code. JVM is a part of JRE(Java Runtime Environment).
•Java applications are called WORA (Write Once Run Anywhere). This
means a programmer can develop Java code on one system and can
expect it to run on any other Java enabled system without any
adjustment. This is all possible because of JVM.
•When we compile a .java file, .class files(contains byte-code) with the
same class names present in .java file are generated by the Java
compiler. This .class file goes into various steps when we run it. These
steps together describe the whole JVM.
Java source code Java compiler Java
bytecode JVM
.java file javac .class file
Host System