Ask a junior developer to explain JDK, JRE, and JVM, and you'll usually get "JDK is for developers, JRE is for running apps, JVM executes the code" — which is correct, but based on how Java worked before 2018. If you've tried to download a standalone JRE recently and couldn't find one, that's not a broken link. That's an actual, permanent change to how Java is packaged. Let's cover both the classic explanation and what's actually true today.
The three pieces, in plain terms
- JDK (Java Development Kit) — everything you need to build Java applications: a compiler, debugging tools, and (traditionally) a runtime to actually run what you built.
- JRE (Java Runtime Environment) — everything you need to run an already-built Java application, but not build one.
- JVM (Java Virtual Machine) — the actual engine that executes your compiled code. It's the one piece that's platform-specific — there's a different JVM build for Windows, Linux, and Mac, which is exactly what makes "write once, run anywhere" possible.
The classic way to remember the relationship: JDK contains JRE, and JRE contains JVM.
JDK
└── JRE
└── JVM
How a Java program actually gets from code to output
MyProgram.java → javac (compiler) → MyProgram.class (bytecode) → JVM → Output
- You write code in a
.javafile -
javac, the Java compiler (part of the JDK), compiles it into bytecode — a.classfile - The JVM loads that bytecode and executes it
- You get your program's output
A real example:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, Java!");
}
}
Compile it with javac HelloWorld.java, then run it with java HelloWorld. The compile step needs the JDK. The run step only needs a JVM.
A simple way to picture it
Think of it like cooking:
- JDK = a kitchen, ingredients, a chef, and tools — you can cook and serve a meal
- JRE = a kitchen and ingredients only — you can eat a meal someone already cooked, but you can't cook one yourself
- JVM = just the stove — the one part that actually does the cooking
Side-by-side comparison
| Feature | JDK | JRE | JVM |
|---|---|---|---|
| Full form | Java Development Kit | Java Runtime Environment | Java Virtual Machine |
| Purpose | Develop, compile, debug, run | Run Java applications | Execute bytecode |
| Can compile? | Yes | No | No |
| Can run? | Yes | Yes | Yes |
| Used by | Developers | End users (historically) | JRE / the system itself |
| Platform independent? | Yes | Yes | No — a specific JVM build exists per OS |
The part most tutorials get outdated on
Here's the correction that actually matters if you're working with any current Java version: Oracle stopped offering a separate, standalone JRE download starting with Java 11, released in 2018. This wasn't a small tweak — it was a deliberate architecture change.
A few real reasons this happened:
- Java 9 introduced modules (Project Jigsaw), which broke the JDK into smaller, composable pieces instead of one fixed bundle
- That made the old "one-size-fits-all JRE" concept mostly unnecessary
- Instead, Oracle now expects you to either install the full JDK (which includes everything needed to run code too), or build a custom, smaller runtime using a tool called jlink
A real jlink example, building a minimal runtime with only what a specific app needs:
jlink --add-modules java.base --strip-debug --compress 2 --no-man-pages --output minimal-runtime
So if you're on Java 11 or later — meaning any current LTS version (11, 17, 21, or 25) — "install the JRE" isn't really an option anymore in the traditional sense. You install the JDK, whether you're developing or just running an application. The classic JDK/JRE split is still useful for understanding the architecture, but it no longer maps onto two separate downloads.
Where each one is actually used, in practice
- JDK — used by developers in an IDE like IntelliJ or Eclipse, where compiling, debugging, and running all happen locally
- JRE (conceptually) — the piece that still exists inside the JDK, doing the actual "running" work when you execute a program
- JVM — used internally, both by developers running code locally and by production servers executing deployed applications; different builds exist for different operating systems
Quick answers, if this comes up in an interview
- "What's the difference between JDK, JRE, and JVM?" → "JDK is the full development kit — compiler, tools, and a runtime. JRE is just the runtime, for running already-built apps. JVM is the actual engine that executes bytecode. JDK contains JRE, which contains the JVM."
-
"Can you run a Java program with just the JRE?" → "Yes — the JRE has everything needed to run compiled bytecode, but it doesn't include
javac, so you can't compile new code with it." - "Why can't I find a JRE download anymore?" → "Because Oracle stopped offering a separate JRE as of Java 11. You install the JDK either way now, or build a custom minimal runtime with jlink."
- "Is the JVM the same on every operating system?" → "No — the JVM itself is platform-specific. What's identical across platforms is the bytecode it runs, which is what makes Java portable."
The short version
JDK is for building software, JRE is for running it, and the JVM is the actual engine that executes your compiled bytecode — that's still the right mental model. What's changed is the packaging: since Java 11, there's no separate JRE download anymore. The JDK is the only official distribution, and if you need something smaller, jlink builds you a custom runtime instead. Understand the three roles, but don't go looking for a standalone JRE installer on a modern Java version — it isn't there.
Further reading
- JDK 11 Release Notes — Oracle — the official source confirming the JRE download removal
- OpenJDK — the official open-source home of the JDK
- Oracle Java — Oracle's official Java site