Difference between JDK, JRE, JVM and JIT

Pupils are generally confused about JDK, JRE, JVM and JIT in JAVA. The below given explanation is quite better to understand these terminologies properly.

1. JVM:-

   JVM is the virtual machine which can execute the byte code. JVM is the platform dependent code while byte code is platform independent code. So there exist different JVM for different operating system. The below diagram can explain how the JVM is used to execute the java Byte Code.

for to know more about JVM visit the link: JVM Explanation and working

2. JIT:-
     JIT is the Just In Time compiler. It analyses the whole code and analyses the code which is used again and again. it convert those classes to specific machine code faster processing. It can identify the code which is being used again and again and then place them in cache memory. when JVM needs these code for execution then it will catch the code from cache memory. so it makes the execution faster. That is why JAVA is faster than other programming languages. JIT is the inner part of JVM along with interpreter. 

3. JRE:-

   JRE is the abbreviation used for JAVA Run-time Environment. JRE consist of JVM and some libraries which are responsible for the execution of a JAVA program. It also contains some tools which is used mostly in JAVA for the program execution. JRE provides the run-time environment for the java programs. JRE is inner part of JDK. 

4. JDK:- 

  The JDK stands for JAVA Development Kit. JDK is the big daddy of all the above given terminologies. All these things lies within JDK. It can have the tools and features which makes java an adorable language. we can understand JDK form the below given diagram.

Summary:-

  1. JDK consist of Compiler and the JRE.
  2. JRE consist of JVM and APIs. 
  3. JVM consist of interpreter and JIT. 
         - So, JDK provides development tools and run time environment for JAVA programs. JRE supports JVM for the execution of Byte Code by executing some instructions. JVM executes Byte Code makes use of Byte Code and give real application of a JAVA code. JIT is used for the performance enhancement of JAVA.
 

Comments

Popular posts from this blog

Screen Saver Development In C language

Installing MySQL(5.7) on MacOS (Monterey)