Learn JDK, JRE and JVM in Java and their differences

What is JVM?

JVM (Java Virtual Machine) is an abstract machine that enables the system to run a Java program.

When you run a Java program, the Java compiler first compiles the Java code into a bytecode. The JVM then converts the bytecode to local machine code (a set of instructions that the computer’s CPU executes directly).

Java is a platform-independent language. Because when you write Java code, it’s actually written for JVM, not your physical device (computer). Because JVM runs operating system-independent Java bytecode, Java is platform-independent.


What is a JRE?

(Java Runtime Environment) is a software package that provides Java class libraries with Java Virtual Machine (JVM) and other components to run Java applications. The JRE includes the JVM.

C: \ Users \ Mr \ Desktop \ java-realtime-enviornment_0.jpg

If you want to run Java applications without expansion, you need JRE. You can download the JRE from the Java 8 Runtime Environment 8 page.

What is JDK?

JDK (Java Development Kit) is a software development kit for developing applications in Java. When you download the JDK, the JRE is also downloaded and there is no need to download it separately. In addition to JRE, JDK also includes a number of development tools (compilers, JavaDoc, Java Debugger, etc.).

C: \ Users \ Mr \ Desktop \ java-development-kit.jpg

If you want to develop Java applications, download JDK.

The image below shows the relationship between JVM, JRE and JDK.

C: \ Users \ Mr \ Desktop \ jdk-jre-jvm.jpg

Leave a Reply

Your email address will not be published. Required fields are marked *