JDK vs JVM vs JRE

Shashane Ranasinghe
2 min readMar 3, 2022

An overview of the JDK, JRE and the JVM, and how they are connected can be shown in a diagram like this. The JDK contains the JRE and the JRE contains the JVM virtually

Java Development Kit (JDK)

The JDK consists of the JRE as well as command-line development tools like compilers and debuggers that are required or useful when creating java applications. The JDK consists of the Javadoc which can be used to generate documentation in HTML format.

Java Runtime Environment (JRE)

The JRE provides all the components that are needed to run the Java Applications. The JRE will deploy the code needed to deploy the JVM on the particular platform. Applications can be released with this runtime environment to make them standalone applications.( A program that can function on its own). The JRE implements the specification provided by the JVM. The JRE’s ByteCode verifier makes sure that the code that is passed to the interpreter is correct, passed all the verifier tests, and the file could execute properly.

Java Virtual Machine(JVM)

The JVM is a virtual Machine. Which means it does not exist physically. The JVM only exists when a program is running. If no Java program is running there wont be a JVM in your computer. The JVM consists of an instruction set and at runtime the JVM manages the memory. The JVM is a specification. It specifies how something should be done. Some of the functionality of the JVM includes memory management, garbage collection, security and also the JVM is responsible in converting the bytecode to machine specific code.

Even though Java is a platform independent language, all of the above mentioned components, The JDK. JRE and the JVM are platform dependent.

References

  1. https://docs.oracle.com/javase/7/docs/technotes/guides/index.html
  2. https://www.geeksforgeeks.org/differences-jdk-jre-jvm
  3. https://www.guru99.com/difference-between-jdk-jre-jvm.html
  4. https://www.javatpoint.com/difference-between-jdk-jre-and-jvm
  5. https://www.programiz.com/java-programming/jvm-jre-jdk
  6. https://howtodoinjava.com/java/basics/jdk-jre-jvm
  7. https://www.oracle.com/java/technologies/security-in-java.html
  8. https://docs.oracle.com/cd/E19620-01/805-4031/6j3qv1oec/index.html

--

--