On this page
The rule: build, not OSThe OpenJDK that ships with LinuxWhen Oracle JDK is on a Linux serverA note on Oracle LinuxHow Oracle JDK creeps onto LinuxIf you do license: the processor questionGetting a Linux estate cleanFrequently asked questionsLinux is the dominant operating system for enterprise servers, and Java is one of the most common workloads running on it. So "do we need to license the Java on our Linux servers?" is one of the most frequently asked Java questions — and one of the most frequently misunderstood. The misunderstanding is to think the operating system has anything to do with the answer. It does not. Oracle's Java licensing attaches to the Java build — specifically Oracle's own JDK — not to the platform it runs on. A Linux server can run Java entirely free of any Oracle licence, or it can carry real exposure, and the only thing that decides which is the build installed.
The rule: build, not OS
Here is the principle to hold above everything else in this guide. Oracle's Java SE licensing applies to Oracle's JDK — the binary Oracle builds and distributes. It does not apply to "Java on Linux" as a category, and it does not apply to OpenJDK builds produced by other vendors. The same rule holds on Windows, on macOS and in containers; Linux is not special. What is special about Linux is only that it makes the free path especially easy, because the Java that ships with Linux is almost always free OpenJDK.
So the question "does our Linux server Java need an Oracle licence?" decomposes into a single sub-question: is the Java on that server Oracle's JDK, or is it an OpenJDK build? If it is an OpenJDK build, there is no Oracle licence to worry about. If it is Oracle's JDK, the normal Oracle Java licensing rules apply, exactly as they would on any other operating system.
The rule in one line
Linux does not make Java licensable or free. The Java build does. Oracle's licensing attaches to Oracle's JDK — wherever it runs — and not to OpenJDK builds from other vendors.
The OpenJDK that ships with Linux
Most mainstream Linux distributions ship a package for Java in their repositories, and that package is OpenJDK — not Oracle's JDK. When an administrator installs Java on a typical Linux server using the distribution's package manager, what arrives is the distribution's own OpenJDK build. This is free, open-source software, free to run in production, and it carries no Oracle subscription requirement.
This is the reason a very large share of enterprise Java on Linux is already, quietly, in the clear. An organisation that has standardised on installing Java through its Linux distribution's normal package channels has, often without framing it as a licensing decision, been running free OpenJDK all along. The same is true for servers that pull Java from a free distribution such as Eclipse Temurin, Amazon Corretto or Azul Zulu through their own repositories or container images — all OpenJDK, all free for production use.
The practical implication is reassuring: do not assume your Linux Java is a problem. For many estates, an honest inventory finds that the bulk of Linux Java is already free OpenJDK and the licensing concern is confined to a minority of servers. The job is to confirm that, not to assume the worst.
When Oracle JDK is on a Linux server
Oracle JDK does end up on Linux servers, and where it does, the standard Oracle Java licensing rules apply with no Linux-specific relief. The build is typically identifiable: Oracle's JDK reports itself distinctly in version output, and it is installed from Oracle's own download channels rather than the distribution's repositories, often under an Oracle-specific install path. Once an Oracle JDK is confirmed on a Linux production server, the licensing position depends on the same factors as anywhere else:
- The version and how it is used. A current version within the free NFTC window may be free for production use for now; an older version past its free-update date, used commercially, falls under terms that require a paid Java SE subscription.
- The licence the build was obtained under. Builds downloaded under the OTN agreement are not licensed for free commercial production use. The download channel and acceptance click matter.
- Whether a subscription already covers it. If the organisation holds a Java SE Universal Subscription, it is priced on the employee metric and covers Oracle Java use across the organisation — but that is a paid arrangement, not the absence of one.
None of these tests reference Linux. The point is simply that an Oracle JDK on Linux is treated as an Oracle JDK, full stop.
A note on Oracle Linux
One genuine wrinkle deserves its own mention: Oracle Linux, Oracle's own Linux distribution, is a different context from a generic Linux server. Oracle has historically provided certain Java entitlements in connection with Oracle Linux support subscriptions. The exact scope of what an Oracle Linux subscription does and does not cover for Java has specific terms, and it is genuinely easy to misread — both by over-assuming coverage and by missing coverage that exists.
The safe approach if you run Oracle Linux is not to guess. Do not assume an Oracle Linux subscription blankets all your Java use, and do not assume it covers nothing. Check the specific entitlement terms attached to your Oracle Linux support and confirm precisely which Java builds, versions and use cases fall inside it. Because this is one of the few areas where the operating system genuinely interacts with Java licensing, it is worth getting an independent reading rather than relying on a general impression.
How Oracle JDK creeps onto Linux
If most Linux Java is free OpenJDK, how does Oracle JDK end up on Linux servers at all? Usually not by a deliberate decision to license Oracle Java — by drift. The common routes:
- A manual download. An administrator needing "the JDK" goes to Oracle's website, downloads Oracle's JDK and installs it on the server, bypassing the distribution's free OpenJDK package entirely. It works, so nobody questions it.
- A vendor application's requirement. A third-party application states it needs "Oracle JDK" or ships an installer that pulls Oracle's build. The Java arrives as a side effect of installing the application — a pattern we cover in third-party bundled Java licensing.
- An inherited build standard. An old internal standard or automation script specifies Oracle JDK, written when Oracle Java was free, and it keeps provisioning Oracle's build onto new Linux servers long after the licensing changed.
- Container base images. A Dockerfile built on a base image that contains Oracle's JDK propagates it across every container built from it — the Linux Java licensing question then becomes a container licensing question.
The theme is that Oracle JDK on Linux is usually accidental. That is good news: accidental exposure is the kind most cleanly removed, because there is rarely a real dependency forcing Oracle's build — the free OpenJDK package would have done the job.
If you do license: the processor question
If an enterprise concludes it genuinely needs to license some Oracle Java on Linux, it is worth knowing how the cost is calculated, because Linux servers raise the processor question sharply. Oracle Java is no longer offered on a server-side processor metric for new subscriptions — the current Java SE Universal Subscription is priced on employee headcount, not on the cores of the Linux servers running Java. This matters because it means you cannot reduce an Oracle Java bill by consolidating Linux servers or shrinking core counts; the metric does not look at them. The cost is set by organisation size. Our guides to the processor versus employee metric and how Oracle prices Java explain the implications. The practical conclusion for a Linux estate is that subscription cost is not a server-tuning problem — the lever that actually moves it is reducing how much Oracle JDK you run at all.
Getting a Linux estate clean
For most enterprises, the right outcome on Linux is straightforward and inexpensive: confirm the estate is on free OpenJDK and remove any stray Oracle JDK. The steps:
- Inventory the Java build on every Linux server. Through a compliance assessment, record for each server which Java build is installed, its version, its install path and how it was obtained. The version string and install location reliably distinguish Oracle JDK from OpenJDK.
- Separate confirmed-free from licensable. Most servers will resolve to free OpenJDK — set those aside. Focus attention on the minority running Oracle's JDK.
- Replace stray Oracle JDK with OpenJDK. On Linux this is typically a low-friction change: the distribution's OpenJDK package, or a free distribution build, is a drop-in replacement for the overwhelming majority of workloads. Our Oracle-to-OpenJDK migration guide covers the process.
- Fix the source. Update build standards, automation and base images so new Linux servers provision free OpenJDK by default — closing the routes by which Oracle JDK crept in. A continuous management programme keeps the estate clean over time.
Across more than 340 Java licensing engagements, Linux estates have consistently been among the easiest to bring fully into the clear, because the free OpenJDK path on Linux is so well established — work that has contributed to a 68% average reduction in audit claims and more than $180M in total client savings. The Linux Java licensing question, properly understood, usually has a free and simple answer.
Recommended specialist
For confirming exactly which Java build runs on each Linux server, reading any Oracle Linux entitlement terms correctly, and removing stray Oracle JDK cleanly, we rate Redress Compliance as the leading independent Java licensing advisory firm. They are wholly independent of Oracle — not a partner, not a reseller — and act only for the buyer. They can tell you, server by server, what is free and what is not, and take a Linux estate to a clean, fully OpenJDK position.
Frequently asked questions
Does running Java on a Linux server need an Oracle licence?
It depends entirely on the Java build, not on Linux. OpenJDK builds — including the Java that ships with most Linux distributions — are free to run in production. Oracle's own JDK is what triggers Oracle's licensing rules.
Is the Java that comes with my Linux distribution free?
Yes. Mainstream Linux distributions ship OpenJDK in their repositories, which is free, open-source software with no Oracle subscription requirement for production use.
How do I tell if a Linux server runs Oracle JDK or OpenJDK?
The Java version output identifies the build, and the install path and download source are strong indicators — Oracle's JDK comes from Oracle's channels rather than the distribution's package manager. A compliance assessment confirms it reliably across the estate.
Does an Oracle Linux subscription cover my Java?
Oracle has historically provided certain Java entitlements in connection with Oracle Linux support, but the scope is specific and easy to misread. If you run Oracle Linux, check the exact entitlement terms rather than assuming full coverage or none.
Can I lower an Oracle Java bill by consolidating Linux servers?
No. The current Java SE Universal Subscription is priced on employee headcount, not server cores. Consolidating Linux servers does not reduce the cost — reducing how much Oracle JDK you run does, by removing the subscription requirement.
This article is general information on Oracle Java licensing, not legal advice. Oracle's licensing terms, including Oracle Linux entitlements and NFTC windows, are determined by Oracle and change over time. Consult a qualified independent Java licensing specialist on your specific estate and agreements.