JDK, JVM, JRE Explained – What Every Java Developer Should Know

Table of contents
When you dive into Java for the first time, you come across three terms instantly before you even start programming. Knowing what JDK, JRE, and JVM are is essential to every Java developer. Simply googling these three terms will give you thousands of definitions and explanations of what they are and how they work. In this post, we will try to learn these three things in the simplest way possible.
1.JVM (Java Virtual Machine)
We know that Java lets programmers write once, run anywhere (WORA), or Write once, and run everywhere (WORE). This illustrates one of the core features of Java being cross-platform or platform-independent. How does this happen?
When you write your Java code and compile it it turns the code into bytecode which is an intermediary between human-readable and machine-readable code. Now this code can be run on any platform that has JVM.
-JVM converts this bytecode into machine-readable code.
-It runs the programs and takes care of all the background stuff users should not worry about.
-JVM is a subset and part of JRE and JDK as we will learn further.
2.JRE (Java Runtime Environment)
JRE is the basic requirement needed in a system to run a Java application.JRE consists of JVM and its supported standard library classes which are required to run the application.
3.JDK (Java Development Kit)
JDK is the software development kit containing all your development tools required to write, compile, debug, and run a Java program. It contains a javac(Java compiler ), a debugger, Java library source code, and many more tools. It is also a superset of JRE and JVM.
Below is the complete JAVA 8 SE component diagram from oracle:
Subscribe to my newsletter
Read articles from CodeStorm directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
