Tuesday 23 August 2016

JDK-JRE-JVM :

Understanding the relationship between JDK(Java Development Kit) , JRE (Java Runtime Environment) and JVM(Java Virtual Machine) is very important since this forms the base of Java.
Everybody will have a confusion in this three terms on what this really mean. In most of the interviews, interviewer may ask this question to test the basic knowledge about Java. This will help you to understand why Java is platform independent.



JDK - Java Development Kit
     When you download java JDK and install it in your machine you can see JRE will be within JDK. JDK is a development kit which has the javac. Latest version of JDK is 8.


JDK is used for development of the code, running the code and displaying the result.




JDK = JRE + JVM

JDK = Development + Execution + Display

If a machine has JDK installed then it has the environment to develop the code, run the code and display the result.


JRE - Java Runtime Enviroment

  JRE is used for execution of the code. JRE internally contains JVM which interprets the byte code and converts it into machine understandable format.

JRE = Execution + Display


JVM - Java Virtual Machine is an abstract machine. This machine is used for execution of the bytecode. This converts the byte code and make its understandable by the machine. JVM is system dependent. There are many flavors of JVM for different Platforms and Operation system.

JVM architecture is very important to understand. I will explain the JVM architecture in future posts.




No comments: