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.
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.
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 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.
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.
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.
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.
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:
| Distribution | Nature |
|---|---|
| Eclipse Temurin | Community-governed OpenJDK builds from the Adoptium project. |
| Amazon Corretto | OpenJDK builds distributed by Amazon, free to use. |
| Azul Zulu | OpenJDK builds from Azul, with free and supported tiers. |
| Microsoft Build of OpenJDK | OpenJDK builds distributed by Microsoft. |
| Red Hat build of OpenJDK | OpenJDK 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.
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:
| Dimension | OpenJDK (open source) | Oracle JDK (commercial) |
|---|---|---|
| Licence | GPLv2 with Classpath Exception | OTN agreement / Java SE subscription terms |
| Production use | Free | OTN forbids free production; subscription required |
| Cost | No licence fee | Priced on the employee metric |
| Audit exposure | No Oracle subscription, no Oracle audit clause | Subject 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.
What does open-source Java licensing actually mean for an organisation? A few concrete conclusions follow:
A few myths cause real anxiety and deserve to be retired:
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.
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.
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.
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.
The two tracks compared in full.
Legal & ContractualThe commercial side of Java licensing.
MigrationChoosing an open-source build.
ComparisonsA leading open-source distribution.
FundamentalsWhen Java costs nothing — and when it does.
ServiceMove to open-source Java safely.
We will inventory your estate, confirm which builds are genuinely OpenJDK, and plan a migration off Oracle Java that removes the licence fee entirely.
Weekly Oracle Java updates, audit alerts, and negotiation intel.