Go Back

Difference between JDK, JRE and JVM

7/29/2021
All Articles

#Difference_between #JDK #JRE #JVM #java #difference #between

Difference between JDK, JRE and JVM

Difference between JDK, JRE and JVM

what is the difference between JDK, JRE and JVM is important in Java ? We are having brief overview of JVM here.

let's see the basic differences between the JDK, JRE and JVM.

JVM (Java Virtual Machine)

it is responsible for runtime environment in which java bytecode can be executed. 
JVMs are available for many hardware and software platforms. JVM, JRE and JDK are platform dependent because configuration of each OS differs. But, Java is platform independent.
The JVM performs following main tasks: 

  1. •    Loads code
  2. •    Verifies code
  3. •    Executes code
  4. •    Provides runtime environment
     

for more details click here

 

Internal Architecture of JVM

  1.  Classloader:   It is responsible  for  load class files.
  2.  Class(Method) Area:Class(Method) Area stores  per-class structures such as the runtime constant pool, field and method data, the code for methods.
  3. Heap:It is the runtime memory space  in which objects are allocated.
  4. Stack:Java Stack stores frames.It holds local variables and partial results, and plays a part in method invocation and return.Each thread has a private JVM stack, created at the same time as thread.A new frame is created each time a method is invoked. A frame is destroyed when its method invocation completes.
  5. Program Counter Regiser:PC (program counter) register. It contains the address of the Java virtual machine instruction currently being executed.
  6. 6) Native Method Stack: Native Method Stack  contains all the native methods used in the application.
  7.  Execution Engine has  below part :
                    a)  A virtual processor.
                    b) Interpreter:Read bytecode stream then execute the instructions.
                    c) Just-In-Time(JIT)  .

JDK(Java Development Kit)

JDK  is an acronym for Java Development Kit.It physically exists.It contains JRE + development tools. 

for more details click here

 JRE 

JRE is an acronym for Java Runtime Environment.It is used to provide runtime environment.It is the implementation of JVM.It physically exists.It contains set of libraries + other files that JVM uses at runtime. 
Implementation of JVMs are also actively released by other companies besides Sun Micro Systems. 

for more details click here

Conclusion

Here we learn  difference between JDK, JRE and JVM

we see  details of JVM and Internal Architecture of JVM

Hope you like it subscribe our instagram and facebook account for more update .

Article