Difference between JVM, JRE and JDK

Satya PuranamSatya Puranam
2 min read

Java JVM, JRE and JDK

Knowledge - 'Java Runtime Environment' - Viden.io

JVM(JAVA Virtual Machine)

Java Virtual Machine(JVM) is a virtual machine that provides a runtime environment to execute Java byte code. One of the primary purposes of the JVM is to provide platform independence. It manages memory, garbage collection and provides other essential services to ensure the proper execution JVM manages memory allocation and garbage collection. It automatically allocates memory for objects, tracks their usage, and reclaims memory.

Java Virtual Machine (JVM) || CseWorld Online

The JVM dynamically loads classes as they are needed during program execution.JVM is a critical component of the Java ecosystem, enabling the "Write Once, Run Anywhere".

JRE(JAVA Run-Time Environment)

The JRE provides the runtime environment required for executing Java applications. The JRE includes a JVM, which interprets or compiles Java bytecode into native machine code. The JRE contains a class loader, which is responsible for dynamically loading Java classes and resources as they are needed during the execution of a Java program.

JavaMadeSoEasy.com (JMSE): What is JRE (Java Runtime environment)

The JRE is designed to be platform-specific. Different versions of the JRE exist for various operating systems (e.g., Windows, Linux, macOS), allowing Java applications to run on different platforms without modification.

JDK(JAVA Development Kit)

The JDK is an essential toolset for Java developers, allowing them to create, compile, and maintain Java applications for a wide range of platforms and use cases. The JDK includes the Java compiler, which is used to translate Java source code (.java files) into bytecode (.class files). This bytecode can then be executed by the Java Virtual Machine (JVM).

JavaMadeSoEasy.com (JMSE): What is JDK (Java Development Kit)

It's important to note that the JRE is different from the JDK (Java Development Kit). The JDK includes everything in the JRE but also includes development tools, compilers, and debugging tools necessary for Java application development. Developers use the JDK to create, compile, and test Java applications, while end-users need the JRE to run those applications.

0
Subscribe to my newsletter

Read articles from Satya Puranam directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Satya Puranam
Satya Puranam