Skip to main content

Difference between JDK, JRE and JVM

JDK (Java Development Kit)

JDK contains everything that will be required to develop and run Java application. Develop  Tools such as the compilers (javac.exe), Java application launcher (java.exe), Applet viewer and debuggers necessary for developing applets and applications. 

JRE (Java Run time Environment)

JRE contains everything required to run Java application which has already been compiled. It doesn’t contain the code library required to develop Java application.jre

JVM (Java Virtual Machine)

JVM is a virtual machine which work on top of your operating system to provide a recommended environment for your compiled Java code. JVM only works with bytecode. Hence you need to compile your Java application(.java) so that it can be converted to bytecode format (also known as the .class file). Which then will be used by JVM to run application. JVM only provide the environment It needs the Java code library to run applications.

The JVM performs following operation:
  • Loads code
  • Verifies code
  • Executes code
  • Provides runtime environment

The below chart shows the different features of each of the Java technologies.
JDK_JRE_JVM
Now as per diagram you can identify what is the difference.
JRE = JVM + Required Library to run Application.
JDK = JRE + Required Library to develop Java Application.

 Java Code Flow from start to Finish 

1- Java Source Code (Written by Developer) (Machine Neutral)
2- Compiled Code / Byte Code (Compiled by javac) . (Machine Neutral)
3- Byte Code executed (Executed by JVM) (Machine Specific)

Java Life Cycle

Comments

Popular posts from this blog

OOPs Concept For Automation

The java.util package contains all the classes and interfaces of Collection Framework.   Two Main root interfaces : Collection & Map  Parent Interface of Collection is Interable Iterable Interface  : -The Iterable interface is the root interface for all the collection classes and all the collection class implement the Iterable interface. Iterator< T > iterator(); Iterator interface provides the facility of iterating the elements in a forward direction only. // Returns true if the iteration has more elements public boolean hasNext(); // Returns the next element in the iteration // It throws NoSuchElementException if no more  // element present public Object next(); // Remove the next element in the iteration // This method can be called only once per call // to next() public void remove(); interface Collection< E > extends Iterable< E > interface Map< K , V > Collection : Root int...