On this page
OpenJDK Distributions & Toolchain
Prev: JVM & OpenJDK | Up: JVM & OpenJDK | Next: JVM ClassLoading, Bytecode & JIT
Rel: Java, Diagnostics, JFR & jcmd, Garbage Collection (G1 & ZGC)
Ref: OpenJDK Official Site , Java 21 Tool Specifications
Tags: #public #java #openjdk #toolchain #tier/core
Overview
OpenJDK is the official open-source reference implementation of the Java SE Platform (licensed under GPLv2 with the Classpath Exception). Nearly every modern production JDK is built directly from the upstream OpenJDK source tree, including the HotSpot JVM, the javac compiler, the Java class libraries, and the core CLI toolchain.
Release Cadence & LTS
OpenJDK ships a new feature release every 6 months (March and September). Long-Term Support (LTS) baselines are designated every 2 years by major distributors:
- Java 17 (LTS) โ Sealed classes, pattern matching for
instanceof, records finalized, strong encapsulation of JDK internals. - Java 21 (LTS) โ Virtual threads (JEP 444 ), record patterns, pattern matching for
switch, sequenced collections, Generational ZGC. - Java 25 (LTS) โ Next LTS baseline continuing Project Loom, Amber, Panama, and Valhalla refinements.
Major OpenJDK Distributions
All TCK-certified builds pass the Java Technology Compatibility Kit (TCK) and are drop-in compatible at the bytecode and API level:
| Distribution | Maintainer | Notes |
|---|---|---|
| Eclipse Temurin | Adoptium / Eclipse Foundation | Vendor-neutral community standard; widely used in Docker & CI |
| Oracle OpenJDK | Oracle | Reference GPL builds at jdk.java.net (6-month window per release) |
| Amazon Corretto | AWS | No-cost LTS builds with long-term security backports |
| Azul Zulu | Azul | Broad platform/architecture coverage (including macOS ARM64) |
| Microsoft Build of OpenJDK | Microsoft | Free LTS builds tuned for Azure and general workloads |
Core OpenJDK CLI Toolchain
| Tool | Purpose | Common Command |
|---|---|---|
javac |
Compiles .java source to .class bytecode |
javac --release 21 -d out src/Main.java |
java |
Launches the HotSpot JVM (also runs single-file .java directly) |
java -cp out Main or java Main.java |
jshell |
Interactive REPL for prototyping expressions and APIs | jshell |
jar |
Packages .class files and manifest into .jar archives |
jar --create --file app.jar --main-class Main -C out . |
javap |
Disassembles .class files to inspect bytecode and signatures |
javap -c -p out/Main.class |
javadoc |
Generates HTML API documentation from /** ... */ comments |
javadoc -d docs src/Main.java |
jlink |
Builds a minimal custom JRE image containing only needed modules | jlink --add-modules java.base,java.net.http --output runtime |
jpackage |
Wraps a modular app + custom runtime into native installers (.dmg, .msi, .deb) |
jpackage --input lib --main-jar app.jar --name MyApp |
jcmd / jstack / jmap |
Live JVM diagnostics, thread dumps, heap histograms, and JFR control | jcmd <pid> VM.flags |
Single-File Source Execution
Since Java 11 (and multi-file source launches in Java 22), you can run small scripts or tutorials directly without a separate javac step:
java Hello.java
Linked from
Related notes
- tuts/java/jvm_and_openjdk/diagnostics_jfr_and_jcmd Linked here; links to this page; shared tags: #java, #openjdk, #tier
- tuts/java/jvm_and_openjdk/garbage_collection_g1_and_zgc Linked here; links to this page; shared tags: #java, #openjdk, #tier
- tuts/java/jvm_and_openjdk/jvm_classloading_bytecode_and_jit Linked here; links to this page; shared tags: #java, #openjdk, #tier
- tuts/java/jvm_and_openjdk Linked here; links to this page; shared tags: #java, #openjdk
- tuts/interop/java_and_c_ffm_and_jni links to this page; shared tags: #java, #openjdk, #tier
- tuts/java Linked here; shared tags: #java, #openjdk
- tuts/third_party/java/gradle links to this page; shared tags: #java, #tier
- tuts/third_party/java/maven links to this page; shared tags: #java, #tier
- tuts/java/builtins/AutoCloseable shared tags: #java, #tier
- tuts/java/builtins/enum shared tags: #java, #tier