Difference Between JDK, JRE and JVM

Difference Between JDK, JRE and JVM

 

In this section we will demonstrate the differences between JDK, JRE and JVM as it is very important.

 

JVM:

JVM stands for Java Virtual Machine. The java virtual machine is considered as an abstract machine. The JVM is used to provide a run time environment in which we can run or execute the java byte code.

The Java Virtual machines (JVMs) are available for a number of hardware and software. All the three JVM, JDK and JRE are platform dependent because of the configuration of the operating systems are different in each. But Java as a programming language is independent of platform.

 

JRE:

JRE stands for Java Routine Environment. JRE provides the run time environment. We can consider the JRE (Java Runtime Environment) as an implementation of the JVM. JRE has set of libraries and it also contains other files that are used by JVM at the run time. There are many other companies that released the implementation of JVM other than the Sun Micro Systems.

Consider the following diagram to understand Java Routine Environment:

jre

The above diagram shows what a JRE has that is set of libraries and other files of JVM. JRE physically exists.

 

JDK:

JDK stands for Java Development Kit. JDK has development tools and it also contains JRE. The development tools are like javac to compile the java source file and java etc. JDK also exists physically. Consider the following diagram of JDK (Java Development Kit) in which it is indicated that what lies inside JDK:

jdk