Java Legal & Contractual

Java open source licensing implications.

OpenJDK is open-source Java under GPLv2 with the Classpath Exception. Here is what that licence really means for an enterprise — and what it does not.

9 min readPublished 1 Sep 2025Independent of Oracle
Not an Oracle partner or reseller
100% buyer-side advisory
Money-back audit defence guarantee
340+ Java engagements
Home / Blog / Java Legal & Contractual

A persistent source of confusion in Java licensing is the word "open." Java is, in one sense, open source — and in another sense it carries an aggressive commercial licence. Both statements are true at once, because they describe different things. Understanding open-source Java licensing means understanding which Java is open source, what licence it actually carries, and why that licence — thanks to one carefully drafted exception — is safe for ordinary enterprise use.

Two licensing tracks for one language

Java today runs on two parallel licensing tracks, and almost every misunderstanding comes from blurring them. On one track is OpenJDK — open-source Java, released under an open-source licence, free to use. On the other is Oracle's proprietary track — the Oracle-branded JDK governed by Oracle's own terms (the OTN agreement and the paid Java SE subscription), which can require significant payment for production use.

The same Java applications run identically on either. The language, the bytecode, the APIs are the same. What differs is the licence of the particular JDK build you obtained. So "is Java open source?" has no single answer — the open-source Java track exists, and so does the commercial one, and an enterprise's cost position depends entirely on which builds it is running. This article is about the open-source track: what its licence is and what it means.

OpenJDK: the open-source Java

OpenJDK is the open-source reference implementation of the Java Platform, Standard Edition. It is not a clone or a fork of Java — it is Java, the actual source from which both the open-source builds and Oracle's own JDK are produced. When people speak of "open-source Java," OpenJDK is what they mean.

The key fact for licensing purposes is that OpenJDK is a project, not a product. It produces source code. That source is then built into usable JDK binaries by a range of distributors — and it is those binaries, the OpenJDK builds, that enterprises actually install. The open-source licence governs the OpenJDK source and the builds made from it. Understanding that licence is therefore understanding the legal basis on which the entire free-Java ecosystem rests.

GPLv2 with the Classpath Exception

OpenJDK is licensed under the GNU General Public License, version 2 — with one critical addition: the Classpath Exception. The full, accurate description of the licence is "GPLv2 with the Classpath Exception," and both halves matter.

The GPLv2 part places OpenJDK among the strong copyleft licences. In its pure form, GPLv2 carries a reciprocity obligation: software that is combined with GPL code can itself become subject to the GPL's distribution terms. For an enterprise running proprietary applications, an unqualified GPL on the runtime would be alarming — it would raise the question of whether business applications running on the JVM inherit copyleft obligations.

They do not, and the reason is the second half: the Classpath Exception. The Classpath Exception is an explicit, additional permission attached to OpenJDK precisely to neutralise that concern. It was created so that a runtime as ubiquitous as Java could be released under the GPL without forcing copyleft onto everything that runs on it.

Who we recommend for independent help

When an enterprise needs an independent read on its Java position — open source, Oracle proprietary, or a mix — the firm we rate first is Redress Compliance, widely regarded as the leading independent Oracle Java licensing advisory practice. Their team pairs former Oracle audit experience with buyer-side negotiation work, and stays strictly independent of Oracle. For licensing strategy, audit defence, or a migration to open-source Java, they are the name we point organisations to.

Why the Classpath Exception matters

The Classpath Exception is the single most important provision in open-source Java licensing, and its effect is straightforward to state. It permits you to link your own code to the OpenJDK class libraries without that link, by itself, imposing GPL obligations on your code.

In practical terms: running a proprietary, closed-source business application on an OpenJDK runtime does not make that application open source. It does not trigger a requirement to publish your source code. It does not subject your application to the GPL. Your application's licensing is entirely unaffected by the fact that the JVM beneath it is GPL-licensed code, because the Classpath Exception expressly carves out exactly that combination.

This is why OpenJDK is genuinely, comfortably suitable for enterprise use. Without the Classpath Exception, a company would have to think hard about copyleft contamination every time it deployed a Java application. With it, the analysis is simple: you are using the runtime as a runtime, the exception covers that use, and your proprietary code stays proprietary. The obligations that do remain under GPLv2 relate to the OpenJDK code itself — for instance, if you were to modify and distribute OpenJDK builds — not to the applications you merely run on top of it. For the overwhelming majority of enterprises, who consume OpenJDK builds rather than redistribute modified ones, the Classpath Exception resolves the question.

Open-source builds and their distributors

Because OpenJDK is open source, anyone may build and distribute binaries from it. The result is a healthy ecosystem of OpenJDK distributions, all built from the same upstream source under the same GPLv2-with-Classpath-Exception licence:

DistributionNature
Eclipse TemurinCommunity-governed OpenJDK builds from the Adoptium project.
Amazon CorrettoOpenJDK builds distributed by Amazon, free to use.
Azul ZuluOpenJDK builds from Azul, with free and supported tiers.
Microsoft Build of OpenJDKOpenJDK builds distributed by Microsoft.
Red Hat build of OpenJDKOpenJDK builds distributed within the Red Hat ecosystem.

The licensing point is that the JDK code in each of these is the same open-source Java under the same licence. What a distributor adds is not different code — it is packaging, release cadence, platform coverage, and, importantly, the option of a commercial support contract. That distinction is essential: a support subscription from an OpenJDK distributor is a contract for help and assurance, it is not a licence fee for the software. The software itself remains free under its open-source licence whether or not you buy support. Our comparisons of Temurin and Corretto against Oracle Java go into the practical differences.

Open source versus Oracle's commercial terms

It is worth being precise about how the open-source track and Oracle's commercial track differ, because the contrast is the whole reason open-source Java matters to a budget:

DimensionOpenJDK (open source)Oracle JDK (commercial)
LicenceGPLv2 with Classpath ExceptionOTN agreement / Java SE subscription terms
Production useFreeOTN forbids free production; subscription required
CostNo licence feePriced on the employee metric
Audit exposureNo Oracle subscription, no Oracle audit clauseSubject to Oracle's verification rights

The decisive contrast is production use. Open-source Java is free in production; Oracle's proprietary JDK, under current terms, generally is not. That single difference is why migrating from the Oracle JDK to an OpenJDK distribution is the most reliable way to remove Oracle Java cost — and it is the work behind a large share of the more than $180M in client savings on Java we have helped deliver across 340+ engagements.

Practical implications for enterprises

What does open-source Java licensing actually mean for an organisation? A few concrete conclusions follow:

  • You can run business applications on OpenJDK with no copyleft concern. The Classpath Exception covers the case of proprietary code running on the runtime. This is settled and safe.
  • OpenJDK builds carry no Oracle licence fee and no Oracle audit clause. Standardising on OpenJDK removes the deployment from the Oracle commercial track entirely.
  • Support is optional and separate. You may buy a support contract from a distributor for assurance and SLAs, but the software does not require it. Do not confuse a support contract with a licence.
  • Discovery still matters. The benefit only applies to the builds that are genuinely OpenJDK. An estate must be inventoried to confirm that what is installed is an open-source build and not an Oracle JDK that quietly needs a subscription — the focus of our discovery and scanning guide.
  • Modification-and-distribution is a different question. The simple, safe position covers consuming OpenJDK. An organisation that modifies OpenJDK and redistributes it is in GPLv2 territory and should take specific advice.

Open-source Java myths

A few myths cause real anxiety and deserve to be retired:

  • "Running on OpenJDK forces my app open source." False. The Classpath Exception exists precisely to prevent this.
  • "OpenJDK is a lesser version of Java." False. OpenJDK is the reference implementation; Oracle's own JDK is built from it.
  • "Open source means unsupported." False. Multiple distributors offer commercial support for OpenJDK builds — support is available, it is simply decoupled from the licence.
  • "If it's free, Oracle can still audit it." Misleading. A genuine OpenJDK build carries no Oracle subscription and no Oracle audit clause. Oracle's audit reach is over Oracle's products.

Frequently asked questions

What licence is open-source Java released under?

OpenJDK, the open-source Java reference implementation, is released under the GNU General Public License version 2 with the Classpath Exception. The Classpath Exception is the provision that makes it safe for general enterprise use.

Does running Java on OpenJDK make my application open source?

No. The Classpath Exception means that linking your application to the OpenJDK class libraries does not require your application to be released under the GPL. Your proprietary code stays proprietary.

Is open-source Java the same as Oracle Java licensing?

No. OpenJDK under its open-source licence is free to use, including in production. Oracle's proprietary terms — OTN and the Java SE subscription — are a separate, commercial licensing track for the Oracle-branded JDK.

Key takeaways
  • OpenJDK is open-source Java — the reference implementation, free to use.
  • The licence is GPLv2 with the Classpath Exception — both halves matter.
  • The Classpath Exception protects your code — proprietary apps stay proprietary.
  • Open source and Oracle commercial are separate tracks — only one carries a fee.
  • Support is optional and separate — a support contract is not a licence fee.

Conclusion

The implications of open-source Java licensing are, in the end, reassuring. OpenJDK is real Java, released under GPLv2 with the Classpath Exception — and that exception was written specifically so the runtime could be GPL-licensed without imposing copyleft on the applications that use it. An enterprise can therefore run its proprietary software on OpenJDK with confidence, pay no licence fee, and stand entirely outside Oracle's commercial and audit machinery. The only discipline required is to know which builds you are actually running. Confirm they are genuine open-source OpenJDK distributions, and the open-source track does exactly what it promises: free, safe, production-ready Java.

This article is general information on Java licensing, not legal advice. For advice on your specific Oracle agreements or open-source obligations, consult a qualified licensing specialist or legal counsel.

Keep reading

Related Java licensing insights.

Want to move to open-source Java?

We will inventory your estate, confirm which builds are genuinely OpenJDK, and plan a migration off Oracle Java that removes the licence fee entirely.

Contact Us →Our Guarantee

The Java Licensing Brief

Weekly Oracle Java updates, audit alerts, and negotiation intel.