Written by - Yash Agrawal

Difference between JDK JRE and JVM


JVM, JRE and JDK are the most important things in Java. Let's see in brief.


JVM - Java Virtual Machine

JVM (Java Virtual Machine) is an abstract machine. Is is called virtual machine because it doesn't exist. It is made just to provide runtime environment in which byteCode can be executed. It can also run those programs which are written in other languages and compiled to Java bytecode.
JVMs are available for many hardware and software platforms. JVM, JRE, and JDK are platform dependent because the configuration of each OS is different from each other. However, Java is platform independent. There are three notions of the JVM: specification, implementation, and instance.
JVM sets Memory area, check for class file format, Register sets, Garbage collected heap, fatal reporting ect.


JRE - Java Runtime Environment

JRE - Java Runtime Environment is a set of software tools which are used for developing Java applications. It is used to provide the runtime environment. It is the implementation of JVM. It physically exists. It contains a set of libraries + other files that JVM uses at runtime. The implementation of JVM is also actively released by other companies besides Sun Micro Systems.


JDK - Java Development Kit

JDK - Java Development Kit is nothing but the environment for creating java applications It physically exists. It contains JRE + development tools. The JDK contains a private Java Virtual Machine (JVM) and a few other resources such as an interpreter/loader (java), a compiler (javac), an archiver (jar), a documentation generator (Javadoc), etc. to complete the development of a Java Application.