JDK and JRE are core components of the Java ecosystem. Although developers do not directly interact with them while writing code, understanding their roles is essential for Java development, application execution, and interview preparation.
JDK
DK stands for Java Development Kit. It is a complete software development environment used to develop, compile, debug, and run Java applications. The JDK is platform-dependent and available for operating systems such as Windows, macOS, Linux, and Solaris.
The JDK includes:
- Java compiler (javac)
- Java launcher (java)
- Debugger, documentation tools, and other utilities
- Java Runtime Environment (JRE)
Multiple versions of JDK can be installed on the same system, which is useful for maintaining different Java projects.

JRE
JRE stands for Java Runtime Environment. It provides the runtime environment required to execute Java programs. It does not include development tools such as compilers or debuggers.The JRE consists of:
- Java Virtual Machine (JVM)
- Core Java class libraries
- Supporting files required for program execution
If the goal is only to run Java applications, installing JRE is sufficient. Development and compilation require JDK.

Let's see the main difference with the help of the below diagram:

Explanation:
- JVM (Java Virtual Machine) executes Java bytecode.
- JRE = JVM + standard class libraries
- JDK = JRE + development tools
Difference Between JDK and JRE
| KEY | JDK | JRE |
|---|---|---|
| DEFINITION | JDK(Java Development Kit) is used to develop Java applications. JDK also contains numerous development tools like compilers, debuggers, etc. | JRE(Java Runtime Environment) is the implementation of JVM(Java Virtual Machine) and it is specially designed to execute Java programs. |
| FUNCTIONALITY | It is mainly used for the execution of code and its main functionality is development. | It is mainly used for creating an environment for code execution. |
| DEPENDENCY OF PLATFORM | It is platform-dependent. | It is also platform-dependent like JDK. |
| TYPE OF TOOLS | Since JDK is responsible for the development purpose, therefore it contains tools which are required for development and debugging purpose. | On the other hand, JRE is not responsible for development purposes so it doesn't contain such tools as the compiler, debugger, etc. Instead, it contains class libraries and supporting files required for the purpose of execution of the program. |
| IMPLEMENTATION OF JDK AND JRE | JDK = JRE + other development tools. | JRE = JVM + other class libraries. |