DEV Community

Alaguselvan T
Alaguselvan T

Posted on

JVM,JRE,JDK

1.JVM-Java virtual Machine
JVM is responsible for running Java bytecode.
The Java compiler (javac) converts it into bytecode
The .class file contains bytecode, and the JVM executes this bytecode
Main responsibilities of JVM:
Loads .class files
Verifies bytecode
Executes bytecode
Manages memory
Performs garbage collection
Provides platform independence

2. JRE — Java Runtime Environment
JRE provides the environment required to run Java applications.
JRE = JVM + Libraries required to run Java programs
If you only want to run a Java application, you need the runtime environment.

3. JDK — Java Development Kit
JDK is used to develop Java applications.
The important tool is:javac → Java compiler
It converts:.java → .class

JDK = JRE (+JVM)+ Development Tools
JRE = JVM + Java Libraries
JVM = Executes Java Bytecode

Top comments (0)