JDK
Java Development Kit — build + run toolkit
The JDK is the full Java toolkit for developing Java apps.
- Compile:
.java→.classusingjavac - Run: run
.class/.jarusingjava - Includes extra tools:
jar, debuggers, diagnostic tools, etc.
JRE
Java Runtime Environment — run only
The JRE is the Java runtime needed to run Java applications.
- Includes the JVM + core libraries
- Does not include developer tools like
javac - You use it when you only need to run an app, not build it
JAR
Java Archive — packaged application output
A JAR is a package file (like a zip) that bundles compiled Java classes and resources.
- Spring Boot often builds an executable “fat/uber” JAR that includes dependencies.
- Run it with:
java -jar app.jarJVM
JVM stands for Java Virtual Machine. It’s the runtime engine that runs Java programs.
Here’s the typical pipeline:
- You write
Hello.java - The Java compiler (
javac) compiles it into bytecode:Hello.class - The JVM loads and executes that bytecode on your machine