Difference between JDK vs JRE vs JVM

  • Post author:
  • Post category:Java / Java Basic
  • Post last modified:August 24, 2021
  • Reading time:2 mins read

What is JDK

JDK is the acronym of JAVA Development Kit. JDK is a package of tools for developing Java-based software. Java developers can use it on Windows, macOS, Solaris, and Linux Operating systems. JDK helps them to code and run Java programs.

JRE(Java Runtime Environment) and Java Development tools are the subset of JDK.

JDK = JRE + Java Development Tools

Features of JDK

  • Provides software development environment
  • Includes java application launcher, debugger, compiler, Applet viewer etc.
  • Platform dependent
  • Superset of JRE

What is JRE

JRE is the acronym of Java Runtime Environment. JRE is a software program that allows you to run other programs. The class libraries, loader class, and JVM are all included in the JRE. In simple terms, if you want to run Java program you need JRE.

JRE = JVM + packages + Runtime Environment

Features of JRE

  • It’s a software used to run other software
  • It is the environment used to run Java applications
  • It includes class libraries, loader classes , JVM etc.
  • Platform dependent
  • Subset of JDK and Superset of JVM

What is JVM

JVM is the acronym of Java Virtual Machine. The Java Virtual Machine (JVM) is a program that offers a runtime environment for Java code or applications. It converts Byte code to machine executable code. JVM is a part of Java Run Environment (JRE). It cannot be separately downloaded and installed. 

Main Task of JVM

  • Loads code
  • Verifies code
  • Executes code
  • Provide runtime env. libraries

Features of JVM

  • Java Virtual Machine converts byte code to the machine-specific code.
  • It provides basic java functions like memory management, security, garbage collection, and more.
  • It can execute the java program line by line hence it is also called as interpreter.

Hope you like it!