Yes, Java is still free. The Java language and OpenJDK, the open-source reference implementation, are free under the GPL with the Classpath Exception, and you can use them commercially at no cost. Oracle's own Oracle JDK builds are also free for most uses in recent releases, but its paid Java SE subscription is where licensing costs apply.
Which Java you download decides the terms, so the useful question is not "is Java free" but "which build and which licence".
Java SE is a specification. OpenJDK is the open-source project that implements it, and many vendors build and distribute binaries from the OpenJDK source. Oracle also publishes its own build, Oracle JDK, from the same code base under a different licence.
| Distribution | Vendor | Licence | Cost for production |
|---|---|---|---|
| OpenJDK builds from jdk.java.net | Oracle (reference) | GPLv2 with Classpath Exception | Free, updates only for the latest release |
| Eclipse Temurin | Eclipse Adoptium | GPLv2 with Classpath Exception | Free |
| Amazon Corretto | Amazon | GPLv2 with Classpath Exception | Free |
| Microsoft Build of OpenJDK | Microsoft | GPLv2 with Classpath Exception | Free |
| Azul Zulu | Azul | GPLv2 with Classpath Exception | Free (paid support available) |
| Oracle JDK | Oracle | NFTC for current releases, OTN for some older ones | Check the terms for your version |
The Classpath Exception matters: it means the programs you compile and run on OpenJDK do not become GPL themselves.
The common confusion has a timeline:
The details depend on the exact version and update, so read the licence that ships with the build you plan to use. If you are unsure, use a free OpenJDK distribution and you avoid the question.
For most teams the choice is straightforward:
Check which build you have installed:
The vendor appears in the second line. If it says Oracle, review the licence for that version.
If you build for yourself or learn Java, install any OpenJDK distribution. If you run production services, use a free OpenJDK build with regular security updates, and in containers use an official base image from the vendor you chose.
Companies that must use Oracle JDK, for example because of a support contract, should have legal or procurement confirm the licence per version. Companies that only need a runtime rarely have a reason to pay: the free builds are built from the same OpenJDK source.
Paid support is available from several vendors, and it is worth buying when you need a service-level agreement, rather than because the code itself costs money.
For recent releases covered by the NFTC, yes, including for commercial use, but only for the period the licence defines. Older releases and some updates fall under terms that require a paid subscription. Always read the licence for your exact version.
They are built from largely the same source code. Differences are the licence, packaging, support terms and a few vendor-specific extras.
Yes. The Java language and OpenJDK builds are free for commercial use, and the programs you write are yours.
Use the newest LTS release your libraries support, currently Java 25, or Java 21 if you need the earlier LTS.
Java is free: OpenJDK is open source, and distributions such as Eclipse Temurin, Amazon Corretto, Microsoft Build of OpenJDK and Azul Zulu cost nothing for production. Cost appears only with Oracle's paid subscription and with the specific Oracle JDK terms for a given version. Choose an LTS release from a free OpenJDK vendor and verify the vendor in java -version.