πŸƒJDK vs JRE vs JVM

Describe about JDK, JRE and JVM

JDK is a software development tool for Java with environment (runtime). JDK compose of JRE (Java runtime) , Java intrepreter, Java compiler(javac) and archiver(jar).

JDK = JRE + Developer Tools 

JRE is a runtime environment that use for execute Java language.

JRE = JVM + Library class

How JRE work?

When you finished to implement the code, your code will be compiled from source code to byte code by javac at runtime.

Example

source code                     byte code 
Hello.java         --->        Hello.class

In the runtime period, it will have 3 process occur including

  1. Class loader

  2. Byte code verifier

  3. Interpreter

Class Loader

This process will load essential class for execution from hard disk or network or other resource.

Byte Code Verifier

This process will verify about format of code and object pointing.

Interpreter

Interpreter will be interpreter of byte code and hardware when execute java program in each line of code.

JVM (Interpreter)

JVM is the most important part of JDK and JRE. JVM will execute java program in each line.

Last updated