Java Programming
Environment
Mrs.Sonali S.Patil
Assistant Professor, CSE Department,sharad institute of technology
college of engineering yadrav
How Java program works:
This diagram will show you in detail description.
1)Java compiler will check syntax error.
2)Java interpreter will convert bytecode into native code.
3)After converting into native code or m/c code, we can able to see o/p into
console.
Java Compiler and Java Interpreter:
1) Compiler
• The process of converting entire source code into byte code that
process is known as Java Compiler.
• It is the program that contain set of instruction which is implemented
in c/c++ programming language.
2)Interpreter
• The process of converting byte code into native code, that process is
known as Java interpreter.
What is JDK and JER?
• What is JDK?
• JDK is JAVA development kit, JDK contains JRE + Development tools such as JAVAC
JAVA and JAVADOCS .
• What is JRE?
• JRE stands for Java Runtime Environment. It is a set of components to create and
run a java application. JRE includes JVM, set of libraries, other files,& rt.jar.
What is JVM?
• JVM stands for Java virtual Machine.
 JVM is the Part of JRE.
 JVM is Responsible to Load and Run Java Applications
 JVM performs following tasks:
• Loads the code
• Verifies code
• Execute code
• Provides runtime environment
• Provides library.
What is JVM?
What is JVM?
1)ClassLoader Sub System:
• It loads all the classes into memory area.
• ClassLoader Sub System is Responsible for the following 3 Activities.
1)Loading
2) Linking
3)Initialization
2) Memory Area:
1)Method area/class area
2)Heap Area
3)Stack Area
4)PC register
5)Native method stacks
What is JVM?
3) Execution Engine:
• This is the Central Component of JVM.
• Execution Engine is Responsible to Execute Java Class Files.
• Execution Engine contains 2 Components for executing Java Classes.
1)Interpreter:
• It is Responsible to Read Byte Code and Interpret (Convert) into
Machine Code (Native Code) and Execute that Machine Code Line by
Line.
• The Problem with Interpreter is it Interpreters Every Time Even the
Same Method Multiple Times. Which Reduces Performance of the
System.
• To Overcome this Problem SUN People Introduced JIT Compilers in 1.1
Version
What is JVM?
2) JIT compiler (Just in Time):
• The Main Purpose of JIT Compiler is to Improve Performance.
• Internally JIT Compiler Maintains a Separate Count for Every Method
whenever JVM Come Across any Method Call.
• JIT Compilation is Applicable Only for Repeatedly invoked Methods. But
Not for Every Method
• Java Native Interface (JNI):
• An interface that allows java to interact with code written in another lang.
• It acts as mediator for java method calls & the corresponding native lib. i.e.
JNI is responsible to provide information about native libraries to the JVM.
• Native method library provides or holds native lib. Information.
• e.g. hashcode().

Java Programming Environment,JDK,JRE,JVM.pptx

  • 1.
    Java Programming Environment Mrs.Sonali S.Patil AssistantProfessor, CSE Department,sharad institute of technology college of engineering yadrav
  • 2.
    How Java programworks: This diagram will show you in detail description. 1)Java compiler will check syntax error. 2)Java interpreter will convert bytecode into native code. 3)After converting into native code or m/c code, we can able to see o/p into console.
  • 3.
    Java Compiler andJava Interpreter: 1) Compiler • The process of converting entire source code into byte code that process is known as Java Compiler. • It is the program that contain set of instruction which is implemented in c/c++ programming language. 2)Interpreter • The process of converting byte code into native code, that process is known as Java interpreter.
  • 4.
    What is JDKand JER? • What is JDK? • JDK is JAVA development kit, JDK contains JRE + Development tools such as JAVAC JAVA and JAVADOCS . • What is JRE? • JRE stands for Java Runtime Environment. It is a set of components to create and run a java application. JRE includes JVM, set of libraries, other files,& rt.jar.
  • 5.
    What is JVM? •JVM stands for Java virtual Machine.  JVM is the Part of JRE.  JVM is Responsible to Load and Run Java Applications  JVM performs following tasks: • Loads the code • Verifies code • Execute code • Provides runtime environment • Provides library.
  • 6.
  • 7.
    What is JVM? 1)ClassLoaderSub System: • It loads all the classes into memory area. • ClassLoader Sub System is Responsible for the following 3 Activities. 1)Loading 2) Linking 3)Initialization 2) Memory Area: 1)Method area/class area 2)Heap Area 3)Stack Area 4)PC register 5)Native method stacks
  • 8.
    What is JVM? 3)Execution Engine: • This is the Central Component of JVM. • Execution Engine is Responsible to Execute Java Class Files. • Execution Engine contains 2 Components for executing Java Classes. 1)Interpreter: • It is Responsible to Read Byte Code and Interpret (Convert) into Machine Code (Native Code) and Execute that Machine Code Line by Line. • The Problem with Interpreter is it Interpreters Every Time Even the Same Method Multiple Times. Which Reduces Performance of the System. • To Overcome this Problem SUN People Introduced JIT Compilers in 1.1 Version
  • 9.
    What is JVM? 2)JIT compiler (Just in Time): • The Main Purpose of JIT Compiler is to Improve Performance. • Internally JIT Compiler Maintains a Separate Count for Every Method whenever JVM Come Across any Method Call. • JIT Compilation is Applicable Only for Repeatedly invoked Methods. But Not for Every Method • Java Native Interface (JNI): • An interface that allows java to interact with code written in another lang. • It acts as mediator for java method calls & the corresponding native lib. i.e. JNI is responsible to provide information about native libraries to the JVM. • Native method library provides or holds native lib. Information. • e.g. hashcode().