Video in progress
How do you choose a JDK distribution (Temurin, Corretto, Zulu, Oracle JDK, GraalVM) for a company?
They all come from the same OpenJDK code, so the technical difference is small. The decision comes down to the license, how fast and for how many years security patches are released, the support contract, the extra features needed (CRaC, Shenandoah, native image) and the quality of the container images.
📖 Answer
I ask five questions:
-
License and price. The Oracle JDK license has changed several times; check the current terms with the lawyers. Temurin, Corretto, Zulu (community) and the Microsoft Build of OpenJDK are free and fine for prod.
-
Patch policy. A Critical Patch Update comes out every quarter. How many days does the distribution take to ship it? How many years is an LTS version supported? If our Java 17 services will live another 3 years, this matters.
-
Extra features. Shenandoah isn't in Oracle JDK. CRaC is only in some distributions (Azul Zulu, Liberica and others). Native image and the Graal JIT come with GraalVM. Decide what you need first.
-
Support. If there is a JVM crash or a regression, who do we turn to? Do we need a commercial contract, or is the community enough?
-
Ecosystem. Official Docker images (
eclipse-temurin:21-jre), architectures (ARM/Graviton), a musl/Alpine build, SBOM and signed artifacts, and being well understood by CVE scanners.
My practical advice: pick one main distribution and pin it in the platform base image. If you are tightly tied to a cloud provider, its distribution (Corretto on AWS) is convenient. Allow another one as an exception for services with special needs (CRaC, native image), but documented.
The biggest risk isn't the choice of distribution but having 6 different JDKs and 20 different patch versions in the fleet. Then a security update takes months. That is why I consider the update path (Renovate, automatic base image rebuilds) more important than the distribution.
Sign up to mark studied questions and save your progress.