Java
Programming
UNIT - I
Java Introduction & History
LEARNING Java Features
OUTCOMES
Java platforms
Java architecture & components
• JAVA is a truly object-oriented programming language
• James Gosling, Mike Sheridan, and Patrick Naughton
initiated the Java language project in June 1991. The small
team of sun engineers called Green Team.
Java • Initially designed for small, embedded systems in electronic
appliances like set-top boxes.
Introduction
• Firstly, it was called "Greentalk" by James Gosling, and the
file extension was .gt.
• After that, it was called Oak and was developed as a part of
the Green project.
Java History
java was released as Open Source
Java was developed by Sun Microsystem of
1991 Software
USA 2006
Sun rename J2 version as Java EE, Java ME,
Java SE
Java 1.0 was released with slogan WORA
1995 java applets(programs run on the browser)
were implemented.
2010 sun was acquired by Oracle Corporation
1997 Sun defined Servlets
2020 Java SE 15 was released
1999 sun implemented middle-tier solution J2EE
• Compiled & Interpreted
• Platform- Independent and Portable
• Object Oriented
• Robust and secure
• Distributed
Java Features • Simple, Small and Familiar
• Multithreaded and Interactive
• High Performance
• Dynamic
• Architecture-Neutral
Java Platforms
JAVA SE JAVA EE JAVA ME JAVAFX
(STANDARD EDITION) (ENTERPRISE EDITION) (MICRO EDITION) (JAVA EFFECTS)
Comparisons of Java Platform
• Creates stand- • Creates robust, • Developing • software platform
alone desktop complex apps applications for for creating and
apps, GUI apps, including mobile devices delivering desktop
and other apps; multi-module & and embedded applications
server-centric systems such as
• can be used for set-top boxes. • rich Internet
applications
gaming apps applications (RIAs)
Java SE Java EE Java ME Java FX
True or False
Java is True Object - Oriented Programming Language. True
We can create pointers in Java. False
Java is not platform dependent language. True
Java SE platform is used to create Server – Centric Applications. False
Write once compile anywhere is the slogan of Java. False
Components of Java
Architecture
JAVA DEVELOPMENT KIT JAVA RUNTIME JAVA VIRTUAL MACHINE
[JDK] ENVIRONMENT [JRE] [JVM]
Java Development Kit [JDK]
Software development Contains JRE and several
environment used to development tools, an
develop Java interpreter/loader
applications and (java), a compiler
applets. (javac) and many more.
• Part of JDK
Java Runtime • It is the on-disk system that takes your Java code
Environment[JRE] • combines it with the needed libraries
• starts the JVM to execute it.
Components
of JRE
Java Virtual Machine [JVM]
Java Program
Java Bytecode
(Source Code-
Compiler(javac) (.class file)
.java file)
JVM
Machine Code (java interpreter)
(contains JIT)
Java Virtual Machine
Is a running software system responsible for executing live
Java programs.
Converts Java bytecode into machines language.
JVM is a part of Java Run Environment (JRE).
Working of JVM
Working of
JVM
• CLASS LOADER
• The class loader is a subsystem used for
loading class files. It performs three major
functions viz. Loading, Linking, and Initialization.
Components • METHOD AREA
• JVM Method Area stores class structures like
of JVM metadata, the constant runtime pool, and the
code for methods.
• HEAP
• All the Objects, their related instance variables,
and arrays are stored in the heap. This memory
is common and shared across multiple threads.
Components of JVM
JVM LANGUAGE STACKS PC REGISTERS NATIVE METHOD STACKS
Java language Stacks store local PC register store the address of Native method stacks hold the
variables, and it’s partial results. the Java virtual machine instruction of native code
Each thread has its own JVM instruction which is currently depending on the native library.
stack, created simultaneously as executing. In Java, each thread
the thread is created. has its separate PC register.
Components of JVM
• EXECUTION ENGINE
• It is a type of software used to test hardware, software, or complete systems. The
test execution engine never carries any information about the tested product.
• JIT(Just-In-Time) compiler - It helps in improving the performance of Java
applications by compiling bytecodes to machine code at run time
• Garbage collector - It tracks each and every object available in the JVM heap
space and removes unwanted ones.
• NATIVE METHOD INTERFACE
• The Native Method Interface is a
programming framework. It allows Java
code which is running in a JVM to
Components call libraries and native applications.
of JVM • NATIVE METHOD LIBRARIES
• Native Libraries is a collection of the
Native Libraries(C, C++) which are
needed by the Execution Engine.
Difference between JDK,JRE, JVM
Activity
[Link]
• Are JVM,JDK & JRE Platform
In-dependent? Justify your
Take Home answer.
Task
Thank
You