JDK vs JRE vs JVM in Java

There are several components that make up the Java ecosystem, including the Java Development Kit (JDK), the Java Runtime Environment (JRE), and the Java Virtual Machine (JVM). In this note, we’ll take a closer look at each of these components and their role in the Java ecosystem.

Java Development Kit (JDK)

The Java Development Kit (JDK) is a software development kit used to develop Java applications. It includes a set of tools that are required for developing, debugging, and testing Java applications. The JDK includes the Java Runtime Environment (JRE), the Java compiler, and other development tools.

Here is a table that summarizes the components of the JDK:

ComponentDescription
Java Runtime Environment (JRE)The environment in which Java programs run.
Java compilerA tool used to compile Java source code into bytecode.
DebuggerA tool used to debug Java programs.
JavaFX SDKA software development kit used to develop JavaFX applications.
AppletviewerA tool used to run and debug Java applets.

Java Runtime Environment (JRE)

The Java Runtime Environment (JRE) is the environment in which Java programs run. It includes the Java Virtual Machine (JVM) and the Java class libraries. The JRE is required to run Java applications on a computer.

Here is a chart that shows the relationship between the JDK, JRE, and JVM:

 +------------------------------------------------+
 |                     JDK                        |
 +------------------------------------------------+
 |                                                |
 |                                                |
 |     +-------------------------------------+    |
 |     |                JRE                  |    |
 |     +-------------------------------------+    |
 |     |                                     |    |
 |     |    +--------------------------+     |    |
 |     |    |         JVM              |     |    |
 |     |    +--------------------------+     |    |
 |     |    |                          |     |    |
 |     |    |    Java class libraries   |     |    |
 |     |    |                          |     |    |
 |     |    +--------------------------+     |    |
 |     |                                     |    |
 |     +-------------------------------------+    |
 |                                                |
 |                                                |
 +------------------------------------------------+

Java Virtual Machine (JVM)

The Java Virtual Machine (JVM) is a virtual machine that runs Java bytecode. It is the runtime environment for Java applications. The JVM is responsible for executing Java bytecode and providing a secure and portable environment for Java applications to run in.

Here is a table that summarizes the components of the JVM:

ComponentDescription
Class loaderA component responsible for loading Java classes into memory.
Bytecode verifierA component responsible for verifying Java bytecode to ensure that it is safe to execute.
Execution engineA component responsible for executing Java bytecode.
Runtime data areaThe area of memory used by the JVM to store data at runtime.
Native method interfaceA mechanism that allows Java code to call native methods written in other programming languages.

Also, see the example code JavaExamples_NoteArena in our GitHub repository. See complete examples in our GitHub repositories.

Follow us on social media
Follow Author