Difference between JDK, JRE and JVM

Difference between JDK, JRE and JVM

15 August 2023 0 By Anshul Pal

Java stands as a widely-used object-oriented programming language recognized for its platform independence, enabling code execution on diverse systems. Java programs consist of classes and methods, promoting modular design. It emphasizes strong typing and memory management. Java is very popular for web development, Android apps, and much more due to its reliability and extensive libraries. Read on and find out how Java Virtual Machine (JVM), Java Runtime Environment (JRE) and Java Development Kit (JDK) each play a role in the Java development process, their relationship with each other and the differences that set them apart.

JVM

JVM stands for java development machine. We call it a “virtual machine” because it’s not a physical thing. It sets up a space to run Java code. It can also handle programs written in other languages that are converted into Java bytecode. Java Virtual machines JVMs are available for many hardware and software platforms. It handles memory management, garbage collection, and runtime optimization, enabling efficient and secure execution of Java applications.

The JVM performs the following main tasks:

  • Loads code
  • Verifies code
  • Executes code
  • Provides runtime environment

JDK

JDK Stands for Java Devlopment Kit. The Java Development Kit (JDK) is a set of tools that helps programmers create Java applications. It includes a compiler that turns human-readable Java code into a form that computers can understand, and other tools to help manage and test the code. JDK is essential for developing Java programs and software.

JDK represents an implementation of one of the Java Platforms below, released by Oracle Corporation:

  • Standard Edition Java Platform
  • Enterprise Edition Java Platform
  • Micro Edition Java Platform

JRE

JRE is abbreviated as JAVA Runtime Environment. It is also known as Java RTE. The Java Runtime Environment (JRE) is like a virtual environment for running Java programs on your computer. It includes the Java Virtual Machine (JVM) which interprets and runs Java code, so you can use Java applications and apps without needing to write or compile code yourself. JRE is necessary to run Java software on your system.

In conclusion, we can say that JRE is for running Java applications, JDK is for developing Java applications, and JVM is the runtime engine that executes Java bytecode.

Sugggested Readings!