Choosing a JDK: distribution and version

Temurin, Corretto, Zulu, Oracle — the same code with different support. And what LTS buys you.

4 min read🔧 Setting Up Java

There is no single "download Java" button, and the first time you look there appear to be a dozen options that are all called the same thing. They mostly are the same thing. Here is what actually differs.

They are builds of the same source

OpenJDK is the reference implementation of the Java platform, developed in the open. Almost every distribution you can download is a build of that same source:

DistributionWho builds itNotable for
Eclipse TemurinAdoptium (Eclipse Foundation)the common default; free, no account
Amazon CorrettoAWSfree long-term support, used on AWS
Azul ZuluAzulfree builds plus commercial support
Microsoft Build of OpenJDKMicrosoftAzure-flavoured
Oracle JDKOraclefree under the NFTC licence for current releases; licensing has changed more than once
GraalVMOraclea different JIT, and ahead-of-time native images

Except for GraalVM, choosing between these is closer to a procurement decision than a technical one. The code is the same; what differs is who patches it, for how long, and what the licence says.

LTS, and why 8, 11, 17, 21, 25

Since Java 9, a release appears every six months. Most are supported for six months — until the next one. Some are designated long-term support, and get years of security patches.

plaintext
8 ── 11 ── 17 ── 21 ── 25 ──        LTS, roughly every two years
   9 10  12…16  18…20  22…24        six months each

Production services sit on an LTS. The six-month releases are where you try what is coming, on something that is not paying your salary.

What that means when you pick a version:

  • Learning? The LTS your target jobs run. Today that is overwhelmingly 8, 17 and 21, with 25 arriving.
  • A new service? The newest LTS your libraries support.
  • An existing service? Whatever it is on. Upgrading is a task, not a default.

This course teaches from a Java 8 baseline and marks everything later releases added. That is deliberate: most production Java is 8, 11 or 17, and a reader who knows what is baseline and what is an addition can work on any of them.

Reading a version string

plaintext
openjdk version "21.0.12" 2026-07-21 LTS
OpenJDK Runtime Environment Temurin-21.0.12+8 (build 21.0.12+8-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.12+8 (build 21.0.12+8-LTS, mixed mode, sharing)

Three lines, and each says something different:

  • Line 1 — the platform version. 21 is what matters; .0.12 is the patch level, and the date is its release.
  • Line 2 — the runtime, and who built it. Temurin here. This is the line that answers "which distribution am I actually running".
  • Line 3 — the JVM. 64-Bit Server VM is HotSpot's server compiler. mixed mode means it both interprets and compiles at run time. sharing means class data sharing is on.

Most people read the first line and stop. The second is the one that settles arguments.

JDK or JRE

A JDK contains the compiler and the tools. A JRE is only enough to run. You want a JDK — you are going to compile things, and the tools (javap, jcmd, jstack) are how you diagnose anything later.

For a production container the smaller runtime is worth having, and there is a better answer than a JRE: jlink builds a runtime containing exactly the modules your application uses. That is a deployment concern; for now, install a JDK.

Misconceptions

  • "Oracle JDK is the real one and the others are copies." They are all builds of OpenJDK, to which Oracle is the largest contributor. The differences are support and licensing.
  • "Newer is better." Newer is better when your libraries, your build and your team are ready. An LTS you are not on yet is a project.
  • "I need to match the version on the server exactly." Match the major version. Patch levels differ constantly and are meant to.
Progress is saved on this device and to your account when signed in.