JDK Distributions
When you go to download Java, you'll find several websites offering "the JDK". It's easy to get confused, or to install one that your company isn't allowed to use without paying. A few minutes understanding distributions saves you that trouble, and it's a common question in team discussions when a project is set up.
One Source, Many Builds
Think of OpenJDK as a recipe that everyone can read. Different companies cook from that same recipe, test the result and hand it out. The food tastes the same, but each company offers different service: how long they'll keep it fresh, whether they charge, and whether you can call them for help.
The official test that a JDK behaves like Java SE is called the TCK (Technology Compatibility Kit). The main distributions below are tested against it, so your code runs the same on all of them.
Common Distributions
| Distribution | From | Good to know |
|---|---|---|
| Oracle JDK | Oracle | Oracle's own build. Free under Oracle's terms for recent versions for a limited period; check the license before using it at work |
| Oracle OpenJDK builds | Oracle (jdk.java.net) | Free and open source, but updated only for six months per version |
| Eclipse Temurin | Eclipse Adoptium | Free, open source, very widely used; a good default |
| Amazon Corretto | Amazon | Free, with long-term updates; common on AWS |
| Microsoft Build of OpenJDK | Microsoft | Free; common on Azure |
| Azul Zulu | Azul | Free builds, with paid support available |
| Red Hat build of OpenJDK | Red Hat | Included with Red Hat Enterprise Linux |
GraalVM is related but different: it is a JDK with extra tools, including one that turns a Java program into a native executable file.
Which One Should You Install?
| You are | Install |
|---|---|
| Learning Java (this course) | Eclipse Temurin 25 |
| Working on a company project | Whatever the project already uses; ask your team lead |
| Deploying to AWS or Azure | Often Amazon Corretto or Microsoft Build of OpenJDK |
The lesson "Installing the JDK" walks you through it step by step.
See Which JDK You Are Running
Java can tell you its version and who built it.
public class WhichJdk {
public static void main(String[] args) {
String version = System.getProperty("java.version");
String vendor = System.getProperty("java.vendor");
System.out.println("Java version: " + version);
System.out.println("Vendor: " + vendor);
}
}Java version: 25.0.1
Vendor: Eclipse AdoptiumThis output comes from Eclipse Temurin 25. Your output depends on the JDK you have installed.
How it works
- Line 3 reads the system property
java.version, the full version of the running Java. - Line 4 reads
java.vendor, the company or project that built this JDK. - Lines 6 and 7 print both values.
Try it yourself: run it on your computer after you install Java (see "Installing the JDK"). Which vendor and version do you see?
Common Mistakes
Thinking OpenJDK is a "cheaper" or weaker Java. Oracle JDK and the free distributions are built from the same OpenJDK code. For learning and for most production use, a free distribution works exactly the same.
Using Oracle JDK at work without checking the license. Oracle's terms have changed over the years, and some uses need a paid subscription. Companies often choose a free distribution to avoid this question.
Installing three JDKs and losing track. It's fine to have several, but know which one your terminal and your IDE use. The java -version command tells you.
Practice
- Easy: In one sentence, explain the difference between OpenJDK and Eclipse Temurin.
- Harder: Change
WhichJdkto also printSystem.getProperty("os.name"). What does it print on your computer?
Key Takeaways
Was this tutorial helpful?