Meet JDK, JRE & JVM


Java is everywhere — from Android apps to backend systems. But behind the scenes, three pillars make it all work: JDK, JRE, and JVM.
If you're just beginning your Java journey or still confused, here's a simple, structured guide to get it crystal clear. Let’s walk through them together.
Table of Contents
A Quick Peek
Diagram: Visualizing JDK, JRE & JVM
Let’s Understand Each With Examples!
JDK
JRE
JVM
Java Flowchart: From Code to Execution
Ready to Code?
# A Quick Peek..
Term | Full Form | What It Does | Analogy |
JVM | Java Virtual Machine | Runs your Java code | Movie Player 🍿 |
JRE | Java Runtime Environment | Provides environment to run Java code | Movie Theater 🎭 |
JDK | Java Development Kit | Toolkit to write + compile + run Java code | Movie Studio 🎬 |
# Let’s Understand Each With Example!
JDK – Java Development Kit
“I want to make a movie!”
You're the director. You need a camera, editing tools, scripts, and actors.
That’s JDK! It gives you:
A code editor (notepad)
A compiler to convert .java → .class
And tools to test, package, and more.
👉 Use JDK when you want to write & build Java programs.
Definition : JDK is a complete toolkit used to write, compile, and build Java programs. It includes the JRE, JVM, and development tools like the compiler(javac) and debugger.
JRE – Java Runtime Environment
“I just want to watch the movie!”
You go to the theater. Screen, sound system, and seats — all ready.
That’s JRE! It gives you:
The player (JVM)
The libraries your program needs to run
👉 Use JRE when you just want to run Java programs (not build them).
Definition: JRE is a package that contains the JVM and the basic tools/libraries needed to run Java applications.
JVM – Java Virtual Machine
“Let’s play the movie!”
You press Play. The player reads the movie file and shows it on screen.
That’s JVM! It:
Reads your compiled code (.class)
Runs it
Manages memory and performance
👉 JVM is like the engine behind every running Java program.
Definition: JVM is the part of Java that actually runs your program. It takes the compiled code (called bytecode) and executes it on your machine.
**Did you know ??**💭🤔
The JVM makes Java platform-independent.
You can write Java code on Windows, and run it on Mac or Linux — without changing a single line.
That’s the magic of Java’s famous motto:
WORA - "Write Once, Run Anywhere"
# Java Flowchart: From Code to Execution
JDK builds it, JRE runs it, JVM executes it! 🚀
# Ready To Code ??
If you're just starting your Java journey, don’t overthink —
Just install the JDK (it includes everything you need).
Start coding, start building — because learning happens best when you do. 💻✨
Subscribe to my newsletter
Read articles from Tripti Bhatnagar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
