DEV Community 👩‍💻👨‍💻

Cover image for What are JDK, JVM, and JRE? The exact difference between them.
Jay Tillu😎
Jay Tillu😎

Posted on

What are JDK, JVM, and JRE? The exact difference between them.

We all ask questions when we are learning something. The good programmers never accept things directly, they always ask questions and understand deeply how the system exactly works. It always gives you more confidence if you know the internal working of the system and understands each and every part of the code.

So now when I started learning java, the first thing I downloaded was JDK. In the fraction of second, my mind asked me that, “Bro did you know what is JDK?” and that was the second when this journey was started. Let’s take a look at what is JDK, JRE, and JVM, and how they work?

JVM (Java Virtual Machine)

It simply helps to execute programs on your device. JVM simply provides an environment to run the programs.

Below are four main tasks of JVM:

  1. Loads the code.
  2. Verifies the code.
  3. Executes the code.
  4. Provides runtime environment.

Without JVM you cannot run the JVM based programs.

JVM is platform dependent. That means we have different JVM configuration for each software and hardware platform. That means the JVM which is run on macOS will not run on windows, for windows you have to download the windows version of the JVM.

JRE (Java Runtime Environment)

Whenever we try to run the code, JVM requires some library set and files for code execution and these files are presented in JRE.

JRE = JVM + set of libraries.

So to run the JVM based programs, the JRE is a minimum requirement.

JRE is also platform dependent. That means we have different JRE versions for different platforms.

JDK (Java Development Kit)

It is a full-featured development kit. JDK has each and every development tool that you may require for creating powerful java programs.

JDK = JRE + Development tools.

JDK contains the following tools:

  1. Java Runtime Environment (JRE).
  2. Interpreter.
  3. Compiler (javac).
  4. Archiver (jar).
  5. Documentation generator (javadoc).
  6. Some other necessary tools.

So in short, if you just want to run the java or JVM based code then JRE is required. But if you want to develop the java or JVM based programs then JDK is required.

So, guys, this was all about JVM, JRE, and JDK. Please let me know in the comments if I missed something.

Please check every day for new posts on Kotlin and other programming topics. Till then Keep Coding, Keep Loving.

Wanna get in touch with me? Here are links. I’ll love to become your friend. 😊
or just mail me at

Top comments (2)

marks7e profile image
Marcos Barrera

This is nice. it's short and go to the point. Thanks for the info.

jay_tillu profile image
Jay Tillu😎

Thanks sir. 🙏🏻 😉

19 Valuable Github Repositories for Beginners

>> Check out this classic DEV post <<