DEV Community

borge
borge

Posted on

Explain the JDK, JRE, and JVM

What is JVM ?

JVM stands for Java Virtual Machine It provides a runtime environment for run java application or code. JVM is an abstract machine that convert the java bytes code into a machine language. Lt is also capable of running the programs written by programmers in other languages. The JVM is also known as a virtual machine as it does not exist physically.

JVM is essentially a part of the JRE (Java Runtime Environemnt). You cannot separately download and install it. you first need to install the JRE to install the JVM. It is available for m any software and hardware platforms. In various distinct programming languages, the compiler functions to produce machine code for specific ststem. However, only the Java compiler produces code for a virtual machine- also knowna as JVM.

Image description

All these, JDK, JRE, and JVM, are dependent. It is because each Operating System's(OS) conditoin is different from one another. But Java is independent of the platform. The JVM has three notions: Implementation, Instance and Specification

JVM primarily performs the following tasks :

  • Provides Runtime Environment
  • Verifies Code
  • Loads Code
  • Executes Code

What is JRE ?

JRE stands for Java Runtime Environment- also written as Java RTE. It is a set of software tools designed for running other software. It is an implementation of JVM, and JRE provides a runtime environment. In short, a user needs JRE to run any Java program. If not a programmer, the user doesn’t need to install the JDK- JRE alone will help run the Java programs.

Image description

All the versions of JDK come bundled up with the JRE (Java Runtime Environment). This way, a user doesn’t have to download and install JRE on their PC separately. The JRE also exists physically. It consists of a library set + a few more files that the JVM (Java Virtual Machine) deploys at the runtime.

What is JDK ?

JDK is an abbreviation for Java Development Kit. It is an environment of software development used for developing applets and Java applications. JDK has a physical existence, and it contains JRE + development tools. One can easily install more than one version of JDK on the same computer. The Java developers can make use of it on macOS, Windows, Linux, and Solaris. JDK assists them in coding and running the Java programs.

Image description

It is an implementation of any of the given Java Platforms that the Oracle Corporation released:

  • Micro Edition
  • Enterprise Edition
  • Standard Edition

The JDK consists of a private JVM (Java Virtual Machine) along with a few other resources, java (a loader/interpreter), like javac (a compiler), Javadoc (a documentation generator), jar (an archiver), etc., for completing the process of Java application development.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more