> For the complete documentation index, see [llms.txt](https://dev7days.gitbook.io/dev7days/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev7days.gitbook.io/dev7days/java/jdk-vs-jre-vs-jvm.md).

# JDK vs JRE vs JVM

Describe about JDK, JRE and JVM

JDK is a software development tool for Java with environment (runtime). JDK compose of JRE (Java runtime) , Java intrepreter, Java compiler(javac) and archiver(jar).

```
JDK = JRE + Developer Tools 
```

JRE is a runtime environment that use for execute Java language.

```
JRE = JVM + Library class
```

**How JRE work?**&#x20;

When you finished to implement the code, your code will be compiled from source code to byte code by **javac** at runtime.

**Example**

```
source code                     byte code 
Hello.java         --->        Hello.class
```

In the runtime period, it will have 3 process occur including&#x20;

1. Class loader
2. Byte code verifier
3. Interpreter

**Class Loader**

This process will load essential class for execution from hard disk or network or other resource.

**Byte Code Verifier**

This process  will verify about format of code and object pointing.

**Interpreter**

Interpreter will be interpreter of byte code and hardware when execute java program in each line of code.

**JVM** (Interpreter)

JVM is the most important part of JDK and JRE. JVM will execute java program in each line.

&#x20;
