Home / Java & licenses

Java licensing

OpenJDK vs Oracle JDK: license, cost, differences and the free builds

The code is the same project. The license on the download is what differs, and for most teams that decides which JDK to install.

Checked November 2026

Two sealed documents on a velvet tray, one with a violet seal and one with a mint seal
Free

OpenJDK builds

GPL v2 with the Classpath Exception. Temurin, Corretto, Zulu, Microsoft and Red Hat ship free builds.

Free to use

Oracle JDK 25

Oracle No-Fee Terms and Conditions. Updates after September 2028 are planned to move to the OTN license.

Subscription

Oracle JDK 8 to 21

OTN license: free for personal and development use. Production needs the Universal Subscription, from $100 a year for up to 10 employees.

OpenJDK vs Oracle JDK is mostly a licensing question. Both come out of the same OpenJDK source tree. Oracle compiles that code into two different downloads: OpenJDK builds at jdk.java.net under an open source license, and Oracle JDK under Oracle's own terms. Other vendors compile it too, which is why you can choose between half a dozen free builds today.

For a team choosing a JDK, OpenJDK vs Oracle JDK comes down to three things: the license, the support period and the cost. This page sets out the license facts, the Oracle subscription prices and the free alternatives. It is general information, not legal advice; for a binding answer on your own setup, read the license text or ask a lawyer.

Figures checked in November 2026.

OpenJDK vs Oracle JDK: the license differences

License Applies to What the license says about use
GPL version 2 with the Classpath Exception OpenJDK source and the OpenJDK builds (Temurin, Corretto, Zulu, Microsoft, Red Hat, Oracle's jdk.java.net builds) Open source; free to use, modify and redistribute under the GPL terms
Oracle No-Fee Terms and Conditions (NFTC) Oracle JDK 25 "a free use license for All Users"
Oracle Technology Network License Agreement for Java SE (OTN) Oracle JDK 8, 11, 17 and 21 releases "free for Personal, Development and other Users only"

The Classpath Exception is the part that matters for application developers. Plain GPL would raise the question of whether an app linked against the Java class library becomes a derivative work. The exception answers it: code that only links to the class library does not have to adopt the GPL. Your closed-source Spring Boot service stays yours.

Oracle has published its OpenJDK builds under this open source license at jdk.java.net since September 2017. The "ready for use" build on jdk.java.net is the current feature release (JDK 27 at the time of checking), not an LTS line, so most teams who want a free LTS with years of patches go to one of the vendor builds below instead.

The Oracle Java license, version by version

The Oracle Java license depends on the release. Oracle JDK 25 is covered by NFTC, which permits free use, production included. Oracle's roadmap adds a condition: JDK 25 updates released after September 2028 are planned to move to the OTN license. So a team that installs Oracle JDK 25 for free today has a clear date to plan for, roughly three years after the release.

The older Oracle JDK releases for Java 8, 11, 17 and 21 are under OTN. That license is free for personal and development use, and production use in a business falls outside it, which is where the paid subscription comes in. Azul's roadmap puts Oracle's end of free commercial use at September 2024 for Java 17, September 2026 for Java 21 and September 2028 for Java 25.

In the OpenJDK vs Oracle JDK decision, none of this is a trap if you read the label before you download. It becomes expensive when an Oracle JDK binary ends up on production servers by habit, for example copied from a developer laptop.

What Oracle JDK costs: Universal Subscription pricing

Oracle sells one product for commercial use of Oracle JDK: the Java SE Universal Subscription. It is priced per employee, with desktop, server and cloud use all covered. Oracle's price list dated October 8, 2026 sets these USD prices, minimum term one year:

Organization size (employees) Price
Up to 10 $100 per year
Up to 100 $1,000 per year
Up to 500 $10,000 per year
501 to 2,999 $10,000 plus $147.20 per employee per year above 500 (800 employees = $54,160 per year)
3,000 to 9,999 $10.50 per employee per month
10,000 to 19,999 $8.25 per employee per month
20,000 to 29,999 $6.75 per employee per month
30,000 to 39,999 $5.70 per employee per month
40,000 to 49,999 $5.25 per employee per month
50,000 and more contact Oracle

The metric is the part people misjudge. "Employee" covers full-time, part-time and temporary staff, plus agents, contractors and consultants, and it counts everyone, not only the people who use Java. A company with 4,000 people and three Java servers pays for 4,000 at $10.50 a month, which works out to $504,000 a year by simple multiplication. The small-business bands are only available through direct transactions with Oracle.

For a five-person startup, $100 a year is trivial. For a mid-size company it is a real budget line, and that alone explains why so many teams standardize on a free OpenJDK build.

Is OpenJDK free? The builds you can use

Is OpenJDK free in practice, with updates? Yes, from several vendors, and each publishes its own support window. The choice between them is mostly about how long you need patches and which cloud you run on.

Build Vendor Java 11 Java 17 Java 21 Java 25
Eclipse Temurin Adoptium (Eclipse Foundation) at least Oct 2027 at least Oct 2027 at least Dec 2029 at least Sep 2031
Amazon Corretto Amazon January 2032 October 2029 October 2030 October 2032
Azul Zulu (Azul Core) Azul Jan 2032 Sept 2029 Sept 2031 Sept 2033
Microsoft Build of OpenJDK Microsoft September 2027 September 2027 September 2028 September 2030
Red Hat build of OpenJDK Red Hat Jan 31, 2032 (ELS-1) Jan 31, 2029 (ELS-1) Sep 30, 2031 (ELS-1) Sep 30, 2033 (ELS-1)

Azul's dates are end of Production Support; Azul adds two years of Extended Support for LTS releases as a paid option. Red Hat's dates are the end of its first extended lifecycle phase for the build shipped with RHEL; full support ends earlier (December 31, 2030 for Java 25). Microsoft gives its dates as the earliest end of support, with quarterly updates in January, April, July and October.

Temurin is the vendor-neutral option, built by the Eclipse Foundation's Adoptium project. Corretto is the natural pick on AWS, and AWS Elastic Beanstalk runs Corretto on its Java platforms. The Microsoft build fits Azure shops. Red Hat's build makes sense if you already pay for RHEL. Any of them is a reasonable answer.

Java licensing in hosting and containers

Java licensing questions rarely come up on platform hosts, because the platform picks an OpenJDK build for you. Heroku installs OpenJDK through its buildpack and defaults to the latest LTS, OpenJDK 25. If you build your own image, choose a base image built on Temurin, Corretto or another OpenJDK build, and the Oracle license never enters the picture. The Java hosting comparison notes how each provider runs Java, and the Java versions timeline has the full support table for Oracle and all free builds, Java 8 included.

A final practical check: run java -version on each production host. The vendor name in the output tells you which license you are actually under, and it is the fastest audit you will ever do.

Sources

  1. openjdk.org/legal/gplv2+ce.html
  2. oracle.com/java/technologies/java-se-support-roadmap.html
  3. oracle.com/java/java-se-subscription
  4. oracle.com/us/corporate/pricing/price-lists/java-se-subscription-pricelist-5028356.pdf
  5. adoptium.net/support
  6. aws.amazon.com/corretto/faqs
  7. azul.com/products/azul-support-roadmap
  8. learn.microsoft.com/en-us/java/openjdk/support
  9. access.redhat.com/articles/1299013
  10. jdk.java.net

Java & licenses / FAQ

Good questions.
Clear answers.

Is OpenJDK free for commercial use?

Yes. OpenJDK is licensed under GPL version 2 with the Classpath Exception, and builds such as Eclipse Temurin, Amazon Corretto, Azul Zulu, the Microsoft Build of OpenJDK and Oracle's own builds at jdk.java.net are distributed under that open source license. What you do not get for free is a contract: paid support is a separate product from several vendors.

Can I use Oracle JDK 25 in production without paying?

Oracle offers JDK 25 under the Oracle No-Fee Terms and Conditions, described as a free use license for all users. Oracle also states that JDK 25 updates released after September 2028 are planned to move to the OTN license, which is free only for personal, development and similar use. Plan for that switch now.

What does the Java SE Universal Subscription cost?

It is priced per employee, not per server. Oracle's price list dated October 8, 2026 starts at $100 per year for up to 10 employees and $1,000 per year for up to 100. Enterprise rates run from $10.50 per employee per month for 3,000 to 9,999 employees down to $5.25 for 40,000 to 49,999. Contractors count as employees.

Is there any technical difference between OpenJDK builds and Oracle JDK?

Oracle JDK and the OpenJDK builds come from the same OpenJDK source code, so for running a typical web app the practical difference is the license, the support period and who ships the patches. Check the support end dates per vendor on the Java versions page before you choose a build.

Which free OpenJDK build has the longest support?

On Java 11, Amazon Corretto runs to January 2032. On Java 25, Corretto supports it to October 2032 and Temurin to at least September 2031. Red Hat's build reaches September 30, 2033 for Java 25 under its ELS-1 phase. Microsoft and Temurin tend to end earlier than the commercial vendors.

Find your next step.