Java 21 License – What’s Free and What Requires Subscription
Java 21, released as a Long-Term Support (LTS) version in late 2023, has become a critical turning point for enterprise Java licensing in 2025.
Many organizations are still trying to untangle Oracle’s new licensing model for Java and understand its implications for their budgets and compliance.
The big question on every CIO’s and CFO’s mind is: Is Java 21 free to use, or will it trigger an Oracle Java SE Universal Subscription? Read our Oracle Java Licensing Guide.
In this comprehensive guide, we’ll clarify exactly what is free under Java 21’s licensing (and for how long) and what scenarios will require a paid subscription.
We take a strategic, risk-mitigation perspective, highlighting the nuances of Oracle JDK 21 vs OpenJDK 21, the No-Fee Terms and Conditions (NFTC) model, and how to avoid costly licensing traps.
By the end, you’ll have a clear roadmap to stay on the “free” side of Java 21, where possible, and a plan to mitigate the hefty costs of Oracle’s Java subscriptions.
Bold takeaway: Misreading Java 21’s licensing terms can result in unexpected enterprise-wide subscription fees. In a worst-case scenario, simply using the wrong Java distribution or failing to upgrade on time could result in a company incurring a multi-million-dollar annual bill. It’s essential to understand the fine line between free use and subscription triggers for Java 21.
What’s Free with Java 21 (and When)
Java 21 is designated as an LTS release, and Oracle has made Oracle JDK 21 available under the Oracle No-Fee Terms and Conditions (NFTC) license.
This NFTC license permits free use for all users, including commercial and production purposes, but only during a specified period of support.
Here’s what “free” means in the context of Java 21:
- Oracle JDK 21 (NFTC period) – Oracle’s own JDK 21 binaries can be downloaded and used free of charge in any environment (development, testing, and production) under NFTC. The catch: this no-fee period lasts until one year after the next LTS release is made. Since the next LTS is Java 25 planned for 2025, Oracle JDK 21’s free updates are provided until around September 2026. During this period, you do not owe Oracle any licensing fees for using Java 21. It’s essentially a grace period intended to encourage adoption of the latest Java.
- OpenJDK 21 Distributions – The open-source OpenJDK 21 is always free under its GNU General Public License (GPL) with Classpath Exception. This includes popular distributions like Eclipse Temurin 21 (from the Adoptium project) and Amazon Corretto 21. These builds are free for production use, with no additional fees. They often come with their own support timeline. For example, Eclipse Temurin and other vendors typically support an LTS for at least four years, and Amazon Corretto 21 is expected to receive updates for many years (Amazon indicates support through 2030). Using OpenJDK 21 in production is a safe choice to avoid Oracle licensing concerns entirely.
- Example – A Startup Staying Free: Imagine a SaaS startup that standardizes its microservices on Eclipse Temurin 21 in Docker containers. They get all the benefits of Java 21’s performance and features with no licensing cost. Even in production at scale, this startup pays $0 to Oracle because Temurin (OpenJDK) is completely free. Had they used Oracle JDK 21 in those containers, they would have eventually risked falling into a paid license — but by choosing an open distribution, they avoided Oracle exposure. This highlights how smart distribution choices keep Java free for your organization.
- NFTC vs. Paid Support Timeline: Under NFTC, Java 21 will receive free updates (including security patches and bug fixes) from Oracle until September 2026. That’s roughly three years of free support from its 2023 release. After that date, Oracle will no longer provide free public updates for Java 21. However, other free distributions (such as Temurin and Corretto) may continue providing updates beyond that for some time. The key is that during the NFTC period, Java 21 is effectively free to use commercially. You only start worrying about payments once that window closes (more on that below).
In summary, Java 21 is currently free for most users if you stay within the NFTC window or adhere to OpenJDK-based builds. But this free ride has an expiration date and conditions, which we’ll explore next.
For previous versions, Java 17 Licensing – NFTC vs. OTN and What Changed in 2025.
When Java 21 Requires a Subscription
So, is Java 21 free forever? Not exactly. The answer to “Do I need a license for Java 21?” depends on which distribution you use, how long you plan to use it, and your usage context.
Here are the scenarios where Java 21 usage will trigger the need for a paid Java SE Universal Subscription (Oracle’s commercial Java license):
- Using Oracle JDK 21 after the NFTC period: Oracle JDK 21 is only guaranteed free under NFTC until September 2026. After that, any new updates (e.g. JDK 21.0.9 and beyond) will likely be released under a different license (the Oracle Technology Network License, OTN). The OTN license does not allow free production use; it’s essentially a placeholder that requires an active subscription for commercial deployment. This means that if, in late 2026 or 2027, your servers are still running Oracle JDK 21 and you need critical security patches, you must purchase Oracle’s Java SE Subscription to legally use those updates. In other words, Java 21’s “free” period ends one year after the next LTS release – beyond that point, continuing with Oracle’s JDK 21 becomes a paid affair.
- Oracle Java SE Universal Subscription model: Oracle now uses an employee-based subscription model for Java licensing. Suppose you need a paid Java 21 license (for example, by using Oracle JDK in production after NFTC or using older Java versions that aren’t free). In that case, the cost is no longer tied to CPU or usage – it’s tied to your total number of employees. Every employee, contractor, and consultant in your organization is counted. This can make costs balloon quickly. The subscription isn’t just for the servers running Java; it’s essentially a company-wide site license priced per headcount. It doesn’t matter if only 50 out of 5,000 employees actively use Java – Oracle will charge for all 5,000. This is a major shift that enterprises must understand.
- Exposure Example – The Cost for a Bank: Consider a bank with 18,000 employees that unknowingly continues using Oracle JDK 21 past the free period. Under Oracle’s Java SE Universal Subscription pricing, the bank could face on the order of $7.5 million per year in Java licensing costs. This ballpark figure assumes Oracle’s per-employee pricing tiers and illustrates how quickly the bill can add up. The organization might be surprised to discover that a background infrastructure component, such as Java, has triggered a multi-million-dollar annual expense. The worst part is that the cost is not based on the number of Java servers or applications, but on every person on the payroll.
- When “Java 21 is free” is true vs false: It’s important to clarify the nuance behind the question “Is Java 21 free for commercial use?”
- If you use OpenJDK 21 or a third-party build (such as Adoptium Temurin or Amazon Corretto), it is free for any use, period. There’s no Oracle fee.
- If you use Oracle JDK 21 and you’re within the NFTC support window (roughly 2023–2026) and you update to new versions promptly within that window, then it is free for now.
- The moment you need Oracle’s support beyond the NFTC window (e.g., critical fixes after 2026 while still on Java 21), or if Oracle changes the licensing after that window, it ceases to be free. At that point, a subscription is required, or you must upgrade to a newer free version (which simply resets the clock), as Java 25 would then be under NFTC for a while, and so on.
- Additionally, if you use Oracle JDK 21 in a manner not covered by NFTC (for example, bundling it with a paid software product you distribute to customers, which constitutes redistribution for a fee), this would break the “free” terms and require a license.
- Subscription Kicks In for Production Use of Older LTS: Note that Java 11 and earlier Oracle JDKs already required a subscription for any commercial use (no free period was offered for those in production). Java 17 had a free NFTC period, which ended one year after Java 21’s release (i.e., late 2024). As of 2025, any shop still running Oracle JDK 17 in production (and requiring updates beyond 17.0.8/17.0.12) is expected to have a subscription. Java 21 will follow the same pattern when its NFTC window closes if you plan to stick with Java 21 for many years, budget for a subscription or consider migrating to an open JDK or a newer LTS later.
- Headcount-Based Fee Impact: Oracle’s per-employee pricing means even small uses of Oracle Java can “poison the well” and force an enterprise-wide license. For instance, a team’s decision to deploy an Oracle JDK 21 on a production server after 2026 could make the entire company liable for a subscription covering all employees. There’s no partial licensing in the new model – it’s all or nothing. This is why many organizations are wary: the question isn’t just “do we need to pay for Java on this server?” but “does using Oracle Java anywhere push us into a contract covering everyone?”
In short, Java 21 requires a subscription in any scenario where Oracle’s free use license (NFTC) doesn’t apply.
This includes using Oracle JDK 21 beyond its free update period or in any context outside the NFTC terms and conditions. The financial exposure is now tied to your headcount, making compliance a high-stakes matter.
Read NFTC License – Understanding the No-Fee Terms and Conditions (Java 17 NFTC License).
Java 17 vs Java 21 vs Java 11 – Why the Rules Differ
Oracle’s Java licensing has evolved over the past few LTS releases, causing different rules for Java 11, 17, and 21:
- Java 11 (LTS from 2018): Java 11 was the first LTS after Oracle’s big licensing shift. Oracle did not provide Java 11 under a free-for-production license. Oracle JDK 11 was only available with the Oracle Technology Network (OTN) license, which permitted free use for development and testing purposes, but not for commercial production. Enterprises using Oracle JDK 11 in production required a paid subscription from the outset. Many companies avoided this by adopting OpenJDK 11 builds (from AdoptOpenJDK, Red Hat, etc.), which were free, or by continuing to use Java 8 for longer. Java 11 essentially had no free long-term use from Oracle’s perspective – you had to pay if you stayed on Oracle JDK 11.
- Java 17 (LTS from 2021): With Java 17, Oracle introduced the No-Fee Terms and Conditions (NFTC) license. This was a notable shift to win back users: Oracle JDK 17 was free to use in production, but only for a limited time. Specifically, Oracle offered updates to JDK 17 under NFTC until one year after the next LTS. Java 21 arrived in Sept 2023, so Oracle provided free JDK 17 updates up to Sept 2024. After that, Java 17’s new updates reverted to a paid license model (OTN/Subscription). In practice, Java 17 gave organizations a 3-year free usage window (2021–2024) to adopt it. Those who planned carefully could run Java 17 at no cost and then upgrade to Java 21 when it became available, staying on the free track. However, anyone sticking with Oracle JDK 17 beyond late 2024 would now need a subscription for further updates. Java 17 thus marked Oracle’s experiment with time-limited free LTS usage.
- Java 21 (LTS from 2023): Java 21 continues the NFTC approach. Oracle JDK 21 is currently free (with updates under NFTC until 2026). The rules are similar to 17’s: use it freely in any environment, but understand that this is a temporary free period. The expectation is that by late 2025 or 2026, you either move to the next LTS (Java 25) to keep receiving free updates, or if you remain on 21, you might have to start paying for extended support. Oracle’s hope is likely that enterprises will continue to upgrade every two years to the latest LTS (staying within a free window each time) or sign up for a subscription to receive continuous support on an older LTS.
- Comparative Summary:
- Java 11: No free production use from Oracle. Pay or use OpenJDK alternatives.
- Java 17: Free production use for 3 years (NFTC), then pay if you don’t upgrade.
- Java 21: Free production use for ~3 years (NFTC), then pay if you don’t upgrade.
- Java 25 (expected to be an LTS in 2025): It is likely to follow the NFTC model as well, continuing the established pattern.
For enterprises, this means that if you were on Java 11 with Oracle JDK, you should either have budgeted for subscriptions or migrated off Oracle’s distribution. Java 17 gave a breather but that grace period has now ended as of 2025.
Java 21 is the current “free” LTS – a window of opportunity to upgrade without immediate licensing costs. But it’s critical to plan: when Java 21’s free period lapses, you don’t want to be caught by surprise.
Decision point: Many companies in 2025 are evaluating whether to remain on Java 17 (and pay for support, since free updates are no longer available), jump to Java 21 to take advantage of a fresh free period, or even stay on the aging Java 8/11 (generally not advisable due to security and compliance concerns).
Strategically, upgrading to Java 21 and using an OpenJDK build can maximize your free usage and buy time until 2026. By then, you can move to Java 25 LTS or reconsider your support strategy.
The key is understanding that the “rules” changed from Java 11 to 17, and remain in flux with 21, so past assumptions may no longer hold.
Deployment Traps That Create Hidden Subscription Risk
Even if you intend to stay on the free side of Java 21, several deployment scenarios can inadvertently trigger Oracle licensing fees. These are the “traps” to watch out for – situations where Java might be embedded, containerized, or used in ways that slip outside the free license terms:
- Containers (Docker/Kubernetes) with Oracle JDK 21: Deploying Java in containers is a common practice now, but be cautious about which JDK is included in your container images. If you use an official Oracle JDK 21 base image or install Oracle JDK in your Dockerfile, you are effectively running Oracle Java in production. During the NFTC period, this is fine, but once that period ends, even a containerized Java counts as usage requiring a license. No loophole allows containers to be exempt – Oracle’s subscription counts employees, not instances. In fact, using Oracle JDK in a sprawling Kubernetes cluster could spread Java across many nodes. While Oracle won’t charge per container, the fact that any Oracle Java is used means your whole company would need to be licensed. Mitigation: Use OpenJDK 21 base images (e.g., Eclipse Temurin’s Docker images or other open JDK images) for your containers. For example, a common choice is the eclipse-temurin:21-jre or openjdk:21-jdk images that carry no Oracle restrictions.
- Third-Party Software Embedding Java: Many enterprise applications and middleware packages include a Java Runtime Environment (JRE) as part of their installer. If that includes JRE, it is Oracle’s, and you might unknowingly be running Oracle Java. Examples could be large ERPs, application servers, or older middleware that bundle Java 8 or 11. The question arises: If a vendor embeds Oracle Java in their product, do you need an Oracle license? Often, the answer is yes, unless the vendor has a distribution agreement in place. Oracle’s policies generally require the end customer to have a license if Oracle JDK is used, even if it came packaged with another product, unless that usage is covered under a broader Oracle product support entitlement. (For instance, Oracle sometimes allows use of Java with their own Oracle-branded products as part of that product’s support contract.) The trap is with non-Oracle third parties: if they haven’t switched to OpenJDK, they might be passing the licensing buck to you. Mitigation: Audit your software portfolio. Ask vendors if their products use Java and if so, what distribution. Push them to supply OpenJDK 21 or other free JDKs with their software. If they require Oracle JDK, negotiate that they or you have the proper Java SE subscription in place – or, better yet, find alternatives that use open-source Java.
- Commercial Features (Flight Recorder, Mission Control): In the past, Oracle included certain Java features as part of a “commercial features” set (e.g., Java Flight Recorder (JFR) and Java Mission Control (JMC) were once exclusive to Oracle paid customers). In modern Java (11+), JFR has been open-sourced and is available in OpenJDK. Additionally, JMC is available as a separate, open-source tool. However, if you’re using older Java or Oracle’s specific tooling around JMC/JFR, be cautious. In Java 21, all standard features of the Oracle JDK are covered by NFTC (no special license is needed for JFR on JDK 21). But if you, say, downloaded Oracle’s Mission Control tool from their site, it might come under separate terms. Also, if you somehow enable features that are part of Oracle’s Java SE Advanced suite (for example, usage tracking or certain management console features), those could require a subscription. Mitigation: Ensure that any tooling used for monitoring Java (profilers, management consoles) is open-source or included in a free license. For JDK 21, stick to the open versions of Flight Recorder and consider using the open-source JDK Mission Control from the Eclipse project instead of Oracle’s build.
- Shadow IT and Developer Downloads: One common compliance gap is developers or IT staff downloading Oracle JDK on their own. For instance, a developer might go to Oracle’s website and grab Oracle JDK 21 on a workstation to test something, or an admin might install it on a server out of habit. These instances, if not tracked, can lead to non-compliant use, especially after the free period. Imagine an intern installs Oracle JDK 17 on a test box in mid-2025 (after its NFTC ended) – technically, that’s unlicensed commercial use. Or a team continues using Oracle JDK 8u351 (a post-2019 update of Java 8 that requires a subscription) on an internal app server. Mitigation: Establish strict policies by using OpenJDK binaries from known sources for all new installations. If Oracle JDK must be downloaded, ensure it’s only for versions under NFTC and note the end dates. Use internal software inventory tools to detect Oracle JDK installations across endpoints and servers. Educate developers on the licensing consequences – they shouldn’t assume “Java is always free” and must follow your approved distributions list.
- Java in Containers on Cloud Services: A nuance on the container point – if you’re using cloud services or third-party container images that include Java, ensure those are not Oracle-based. For example, if a base image or a PaaS service quietly uses Oracle JDK under the hood, you could be on the hook. Most major cloud providers (AWS, Azure, Google) use OpenJDK for their Java services to avoid this, but double-check any managed service that says “Java 21” to see what it’s running under the covers.
- Embedded Devices and Appliances: If Java 21 is embedded in hardware or appliances (such as an IoT device or a network appliance that runs Java-based firmware), licensing can become complex. Typically, these scenarios use OpenJDK or older Java with special arrangements. Just be aware that even non-traditional IT uses of Java should be checked for the Oracle JDK.
Think of these traps as part of a Java 21 compliance checklist. Your checklist should include: inventorying all Java usage (including within containers and third-party apps), verifying the distribution (Oracle vs. OpenJDK), ensuring you’re within the allowed usage (NFTC window or OTN dev-use only), and eliminating or replacing any non-compliant instances before they become an audit liability.
Clear Use-Case Matrix – Free vs Subscription
To make the distinctions crystal clear, the following table outlines common Java 21 usage scenarios and whether they are Free or require a Subscription, along with the reason and how to mitigate any costs.
Use this as a quick reference matrix to assess your own environments:
Scenario | Free or Subscription? | Why / Under What Conditions | Example Financial Impact | Mitigation |
---|---|---|---|---|
Using OpenJDK 21 (e.g. Eclipse Temurin, Corretto) in production on servers | Free | OpenJDK is open source (GPL+CE). No Oracle license needed at all. | $0 licensing cost. (Oracle not involved) | No action needed – best practice for cost avoidance. |
Using Oracle JDK 21 in production during NFTC period (2023–2026) | Free (temporarily) | Covered by Oracle’s NFTC license until Sept 2026. Free updates provided. | $0 cost initially. (But clock is ticking.) | Track NFTC end date. Plan to upgrade or switch before 2026 deadline. |
Using Oracle JDK 21 in production after NFTC ends (post-2026) | Subscription Required | Oracle will switch updates to a paid license (OTN). Production use then needs Java SE Subscription. | Potentially millions per year (scaled by employee count). E.g. 5,000 employees → ~$2M/yr. | Avoid being on Oracle JDK 21 by then: upgrade to Java 25 (free) or move to OpenJDK 21/25. |
Development/Test only use of Oracle JDK 21 after NFTC (no production) | Free for Dev/Test | Oracle’s OTN license (post-NFTC) allows development use without fee, just not production. | $0 direct cost (if strictly non-production). | Ensure it’s isolated. Don’t accidentally deploy Oracle JDK from dev to prod. Prefer OpenJDK in all stages to be safe. |
Java 21 in Docker/Kubernetes using Oracle JDK base image | Subscription if in prod | Containerized Oracle Java is still Oracle Java. NFTC applies until 2026, then not free. | Company-wide license hit once NFTC expires (since it’s production use). | Use OpenJDK 21 base images for containers. Rebuild images with Temurin/Corretto. |
Third-party software embedding Oracle Java 21 (e.g. an ERP includes Oracle JRE) | Subscription likely | If the vendor hasn’t licensed Java for you, your use is subject to Oracle rules. | Surprise license liability if audited – e.g. paying for all employees just due to one ERP server. | Require vendors to use OpenJDK or include Java in their own license. Migrate to software that doesn’t force Oracle JDK. |
Using Java Flight Recorder / Mission Control on Oracle JDK 8/11 (older versions) | Subscription Required | These were commercial features under older licenses (Java SE Advanced). | If ignored, could incur back-licenses or compliance fines. | Upgrade to Java 17/21 where these tools are free, or use open-source JFR/JMC. |
Developers downloading Oracle JDK ad-hoc (shadow use) | Subscription if deployed | If those JDKs end up running apps (especially after free period), it’s a compliance issue. | Could trigger enterprise license requirement if even one prod use occurs. | Implement a Java usage policy, restrict downloads, and use OpenJDK for all developer workstations. |
Java 21 used on employee laptops/desktops (e.g. an internal app) | Free under NFTC; Subscription after | If Oracle JDK 21 is installed company-wide for internal apps, it’s free until updates stop. Then it becomes licensable. | A company with 1,000 desktops would pay ~$12k/month post-NFTC. | Use OpenJDK 21 on desktops, or move internal apps to not require Oracle JRE. |
No Java usage at all (for contrast) | Free | If you can somehow avoid Java entirely, you owe nothing. (Unrealistic for most large enterprises.) | $0 | N/A (but unlikely scenario for enterprise IT). |
Why this matters: The table above illustrates that sticking with OpenJDK 21 or any non-Oracle distribution in every scenario keeps you on the free side.
The moment you opt for Oracle JDK in production beyond its free update period, you flip to a subscription model that can be very costly.
Note that Oracle’s Java SE Universal Subscription is essentially all-you-can-eat (one fee covers unlimited Java use).
Still, you’re paying for every employee whether they use Java or not. Thus, most organizations will only accept that burden if they truly need Oracle’s version/support.
Cost & Risk – How Java 21 Becomes a Company-Wide Bill
It’s one thing to know you might have to pay for Java – it’s another to grasp how quickly it can turn into a significant line item on your IT budget.
With Java 21 and Oracle’s current licensing:
- Per-Employee Licensing = Big Bucks: Oracle’s pricing for the Java SE Universal Subscription starts around $15 per employee per month (for smaller organizations) and scales down to around $5.25 per employee for the largest enterprises. Even with tiered discounts, large companies are looking at millions annually. For example, a firm with 25,000 employees could be staring at roughly $10 million per year in Java subscription costs if it had to fully license everyone. This number is staggering, considering that just a couple of years ago, Java was essentially free to use for many. The per-employee model has effectively turned Java into a company-wide licensed product akin to an enterprise software suite.
- Headcount Inflation: Oracle’s definition of “employee” is expansive, encompassing not only full-time employees but also part-time employees, contractors, consultants, and anyone working for the company in any capacity. That means your license count can exceed your full-time employee count. During an audit or purchase, Oracle will request the total headcount across the organization. The risk is paying for a lot of people who don’t even use Java. For instance, a retail corporation might have 10,000 corporate staff and 15,000 store employees; even if only IT staff use Java, Oracle’s model would count all 25,000. The cost scales accordingly, with little relation to actual Java usage.
- Back-Billing and Audit Risk: A particularly scary scenario is an Oracle audit after the NFTC period ends. Suppose you happily used Oracle JDK 21 from 2023 through 2027 without a subscription, thinking it was “free” (maybe not realizing the free term expired). In 2028, Oracle audits you and finds that for 2 years, you were using Oracle Java outside the free license. They could demand back payment for those two years for all employees, plus penalties. This back-billing could amount to multi-year subscription fees owed at once. In an audit, Oracle may present a six- or seven-figure bill for past unlicensed use, which can become a compliance nightmare. This is why understanding the timelines (when Java 21 stops getting free updates) is crucial. Mark that September 2026 date on your calendar now.
- Opportunity Cost – Paying for Unused Licenses: Oracle’s own pricing FAQ admits some organizations might actually save money under the new model if they had Java everywhere. However, for many, it means paying for a significant amount of unused capacity. Imagine paying $2 million a year when only a handful of legacy apps truly needed Oracle JDK features – that’s money that could have been invested in modernization or third-party support alternatives. CFOs should be concerned about signing up for a deal where over 50% of the license spend could be effectively wasted if a significant portion of the workforce isn’t using Java. It’s essentially an Oracle tax on your entire organization for the actions of a few servers or developers.
- Psychological Impact and Policy Shifts: These costs and risks have already led many organizations to re-evaluate their Java strategy. We’re seeing a significant shift away from Oracle JDK in favor of OpenJDK builds. The new licensing has made Java not just a technical decision but a financial and strategic one. Companies are treating Oracle Java licenses like any other software license, managing them with approval processes, tracking, and, in many cases, a mandate to avoid them if possible. There’s also a growing market for third-party Java support vendors that provide patches for OpenJDK LTS versions, offering companies an alternative to Oracle’s support at a fraction of the cost.
In summary, Java 21 can become a company-wide bill if handled incorrectly.
The combination of per-employee pricing and enterprise-wide scope means a single oversight (like that one Oracle JDK instance left running) can have outsized financial consequences. On the other hand, with careful planning, you can reduce or eliminate this cost, as discussed below.
Mitigation Playbook (Actionable Steps)
To avoid unwelcome Oracle Java bills and maintain control over your Java estate, organizations should adopt a proactive mitigation strategy.
Here’s a playbook of actionable steps to navigate Java 21 licensing safely:
- Standardize on OpenJDK 21 (or other free distributions) for Production: The simplest way to avoid Oracle fees is to not use Oracle’s JDK in production at all. Make it a policy that all server and cloud deployments use an OpenJDK-based distribution such as Eclipse Temurin 21, Amazon Corretto 21, Microsoft Build of OpenJDK, or Red Hat’s build. These are high-quality, TCK-tested Java builds with no licensing cost. They can be drop-in replacements for Oracle JDK in nearly all cases. By standardizing now, you eliminate the risk of subscription when the NFTC free period ends. Ensure your DevOps pipelines, container images, and VM templates all pull from approved open JDK sources.
- Replace Oracle JDK 21 in existing environments: If you already have Oracle JDK 21 running in an environment, plan a migration to an open-source equivalent. Since Java is binary-compatible, you can often switch the JDK underneath an application with minimal or no code changes. Test thoroughly and swap it out. This also applies to older Java versions – for instance, replace Oracle JDK 8 or 11 with an OpenJDK 8 or 11 (many vendors provide builds of these LTS versions). Doing this across the board reduces your audit footprint.
- Lock Down Oracle JDK Downloads (Policy Control): Implement controls so that Oracle JDK isn’t downloaded or installed without review. Many companies treat Oracle JDK like any other licensed software and now require a business justification or architecture review to approve its use. Ideally, block Oracle’s JDK downloads at the firewall or via endpoint management, except perhaps on an as-needed basis for specific users. Provide easy access to OpenJDK alternatives internally so that developers have no reason to visit Oracle’s site.
- Negotiate with Software Vendors: When purchasing or renewing any software that includes Java, negotiate terms that require the use of OpenJDK or that the vendor covers the Java license. For example, if you’re deploying a third-party enterprise application, ask the vendor: “Does your product use Java? If so, which distribution? We require that it uses a freely licensed Java (OpenJDK) or that you take responsibility for any Oracle licensing.” Make this a standard part of procurement checklists. Many software vendors have already switched to bundling OpenJDK to avoid scaring off customers — if yours hasn’t, your request might prompt them to do so. If they won’t budge and the product requires Oracle JDK, factor that into the total cost of ownership (it might make the product too expensive once you add Java fees).
- Disable or Avoid Unneeded Commercial Features: If you do not need certain features like Java Mission Control or Oracle Java Management Service, don’t install them. These might not even be relevant with Java 21 (since Mission Control is separate and Oracle’s Java Management Service is a cloud tool requiring subscription anyway). The point is to minimize the use of anything outside the core Java runtime that could unexpectedly require a license. Stick to the core OpenJDK feature set unless necessary.
- Plan Your LTS Upgrade Cycle Proactively: You know Java 21’s free updates last until September 2026. Well before then, decide your next move. If you want to stay on the free train, plan to adopt Java 25 (the next LTS in 2025) once it’s stable, or Java 27 after that, etc. Skipping versions can be fine (e.g., some may choose to ride Java 17 until 2024, then jump to 21, then to 27). Just don’t find yourself running an outdated Java 21 in 2027 with no plan – that’s how you end up either paying Oracle or risking security by not updating. Align your internal Java upgrade cycle with Oracle’s LTS cadence to maximize free periods. This might involve some work (testing apps on the new version regularly), but it’s worthwhile insurance.
- Implement Java Usage Audits & Monitoring: Treat Java similarly to how you’d treat compliance for databases or Windows licenses. Maintain an inventory of all Java installations in your enterprise. Use configuration management or software asset management tools to detect where Oracle JDK might be installed. Scan container images for references to “oracle/java” or known Oracle binary signatures. Perform periodic audits – for example, a “Java audit” every quarter – to catch any drift from your standard (like a rogue Oracle JDK appearing somewhere). Early detection of non-compliant usage gives you time to correct it or budget for it before Oracle’s auditors do.
- Consider Third-Party Java Support: If you have mission-critical systems that you don’t want to constantly upgrade with each LTS, consider purchasing support from third-party providers. Companies like Red Hat, Azul, or others offer extended support for OpenJDK LTS releases (including backported security fixes) for a fee that often is far less than Oracle’s. This way, you could, say, stay on OpenJDK 17 or 21 for longer without upgrading and still get security patches, all while avoiding Oracle’s per-employee license model. This approach can significantly reduce Oracle Java licensing costs while keeping your systems secure and compliant.
- Headcount Clarity and Segmentation: If worst comes to worst and you must engage with Oracle’s subscription, scrutinize the employee count. Ensure Oracle isn’t counting personnel that shouldn’t be included (e.g., can you exclude part of the business that is legally a separate entity? What about part-time vs full-time definitions?). While Oracle’s standard contract counts everyone, very large enterprises sometimes negotiate custom terms. For example, if only a subsidiary or a specific division uses Oracle Java, license that entity separately if it is a separately incorporated entity. It’s worth discussing with Oracle or a licensing specialist to avoid over-counting. Always push back on inflated employee metrics – provide HR verified numbers, subtract casual labor if possible, etc. Every thousand employees removed from the count is a significant recurring savings.
Following this playbook, a company can significantly reduce Oracle Java licensing exposure or avoid it entirely.
The overarching theme is awareness and control: know where Java is used, use open versions as much as possible, and have a plan for upgrades and support that doesn’t leave you at Oracle’s mercy.
By taking these steps, you transform Java 21 from a licensing landmine into just another well-managed technology in your stack.
FAQs
Finally, let’s address some frequently asked questions that IT asset managers and tech leaders have regarding Java 21 licensing:
Is Oracle JDK 21 free for commercial use?
Oracle JDK 21 is free for commercial use under the Oracle NFTC license, but only for a limited time. During the supported NFTC period (approximately until September 2026), you can use Oracle’s JDK 21 in production without paying fees. However, this is not an indefinite arrangement. After the NFTC period ends, you cannot use updated versions of Oracle JDK 21 in production without a subscription. In essence: Yes, it’s free now for commercial use, but no, it’s not “free forever” under Oracle’s terms. If you require long-term Java 21 usage with updates and support, plan to either migrate to a newer version or purchase a subscription after 2026.
Can I use OpenJDK 21 in production?
Absolutely yes. OpenJDK 21 (and distributions such as Temurin 21 or Amazon Corretto 21) can be used in production with no licensing costs or restrictions. OpenJDK is open-source software. In production environments, it behaves the same as Oracle’s JDK (since Oracle’s JDK is itself built from OpenJDK source with some minor differences). Companies worldwide run mission-critical systems on OpenJDK. Ensure you have a plan for updates (either upgrade to newer versions or obtain updates from a vendor distribution) since the community builds of OpenJDK LTS may stop updates after a certain point (e.g., Oracle’s own OpenJDK builds cease after 6 months, while others continue). Production use of OpenJDK is not only allowed, it’s encouraged if you wish to avoid licensing fees. Many organizations have successfully migrated from Oracle JDK to OpenJDK without any issues.
Does Oracle’s employee-based subscription apply to Java 21?
Yes, if you need a commercial Oracle Java license for Java 21, it falls under the Java SE Universal Subscription, which is employee-based. This model was launched in 2023 and applies to Java SE 17, 21, and all subsequent versions. The moment you require a paid license for Java 21 (for example, after the free period or if you require Oracle’s support), you’d be buying the Universal Subscription. The cost will be calculated based on your total number of employees (including contractors). So even though Java 21 itself introduced a free usage window (NFTC), once that window close,s any paid licensing will use the per-employee subscription scheme – the old per-processor or Named User Plus licenses are essentially phased out for current Java versions.
What happens when the NFTC period for Java 21 ends?
When Java 21’s NFTC period ends (expected around September 2026), Oracle will stop providing free public updates for JDK 21. Any further updates or patches will be made available under a different license (likely the OTN license), which is not free for production use. At that point, there are a few implications:
- Security updates cease (for free users): Your Java 21 installation will no longer receive fixes unless you upgrade to a paid version. Running it indefinitely without updates could expose you to security vulnerabilities.
- License requirement: If you still want to get updates from Oracle for Java 21 after that date, you’ll need a Java SE Subscription (which, as mentioned, is per-employee).
- Option to upgrade: Alternatively, you can choose to upgrade to Java 25 (the next Long-Term Support, or LTS, release, slated for 2025), which will be under NFTC and receive free updates at that time. Oracle’s idea is to encourage users to keep moving forward to the next free LTS rather than sticking with an old one for long.
- OTN for old releases: Java 21 updates, released after NFTC, may be available on Oracle’s support portal for customers and under OTN for others. An OTN license would allow you to use those only in development or testing, or for personal use, not in production, unless you have the corresponding subscription.
In summary, after NFTC ends, Java 21 transitions from a free product to a typical Oracle paid product (for those who want to keep using it in production with the latest fixes).
How do I check if my servers are running Oracle JDK 21 or OpenJDK 21?
You can check the Java runtime vendor information programmatically or manually. A simple way is:
- Run
java -version
on the server’s command line. - Oracle JDK will usually identify itself with a line like
Java HotSpot(TM) 64-Bit Server VM
“Oracle Corporation” is the vendor in the output. For example, you might seebuild 21.0.x Oracle
the version details. - OpenJDK distributions will typically either display the text “OpenJDK” or mention the vendor name, such as Eclipse Adoptium, Red Hat, or Amazon.com Inc. For example:
OpenJDK 64-Bit Server VM (build 21.0.x+..., Eclipse Adoptium)
or similar. - Another clue is file paths: Oracle JDK by default installs in directories like
C:\Program Files\Java\jdk-21
(with “Oracle” in registry on Windows), whereas Temurin might install underAdoptium
directories, etc. - You can also check environment variables or the presence of certain Oracle-specific files (though, since Java 11+, Oracle JDK and OpenJDK are almost identical, the differences are subtle).
Using configuration management tools, you could gather thejava -version
information across all systems. It’s essential to identify Oracle JDK installations, as they are the ones that carry potential license obligations.
Does using Oracle JDK 21 in containers (Docker/Kubernetes) trigger license fees?
Yes, if those containers are used in production after the free period or if you have no subscription, it’s treated as any other use of Oracle Java. Containers do not magically circumvent licensing. Think of a container like just another server from a licensing perspective. If you have Oracle JDK 21 running in 100 Docker containers in a Kubernetes cluster, during NFTC, it’s fine (no cost). After NFTC, continuing to update or use Oracle JDK in those containers means you’re running unlicensed Java in production, which would trigger the need for a subscription covering your whole company. The important note with the new Oracle model is that they won’t charge “per container” or “per server” – they charge per employee, regardless. So, whether you have 1 container or 1000 containers with Oracle Java, if you need to be licensed, you pay for all employees. In short, using Oracle Java in containers is treated the same as anywhere else. The safe approach is to base your containers on OpenJDK images, so you never have to worry about it.
When does Java 21 stop getting free updates?
Oracle will provide free public updates for Java 21 until approximately September 2026. That date is one year after the next planned LTS release (Java 25 in 2025). Java 21 enjoys three years of updates under the NFTC free license (from September 2023 to September 2026). After that, Oracle’s updates for Java 21 will only be available to paying customers. It’s worth noting that other vendors may continue to issue their own Java 21 updates beyond 2026 (for example, some OpenJDK providers might maintain it longer). Still, Oracle’s official stance is that public (no-cost) support ends at that point. If you rely on Oracle’s site for downloads, you’ll notice that after the cut-off, new patch versions won’t be available publicly. So, mark September 2026 as the end of free updates for Java 21.
If we have an Oracle product (database, middleware) that includes Java, do we need a separate Java license?
In many cases, if you are using Java solely as part of another Oracle product that you have licensed/support for, you may be covered for that use of Java. Oracle’s policy (stated in their support entitlements) is that customers with certain Oracle products can use the Java that comes with those products without a separate subscription, for the purpose of running that product. For example, Oracle WebLogic or Oracle Database may require Java – if you’re licensed for those, Oracle isn’t going to double-charge you for the Java runtime that their product uses. However, this exception is narrow. It doesn’t cover using that Java for anything else. If the same server runs custom Java apps, that’s outside the entitlement. Also, it applies only to Oracle’s products. If another vendor’s software includes Oracle Java, that’s not covered by Oracle (you’d have to see if that vendor has a deal or if you need to license Java). Always check the specifics: Oracle publishes a list of products that include a Java SE entitlement. When in doubt, consult your Oracle account rep or licensing specialist to confirm. Don’t assume that just because Java came with something that you’re automatically licensed for general use.
What’s the difference between Oracle JDK 21 and OpenJDK 21?
Functionally, Oracle JDK 21 and OpenJDK 21 are nearly identical – they are built from the same source code for the most part. The differences lie in licensing, support, and a few minor add-ons:
- License: Oracle JDK 21 is under Oracle’s NFTC (then OTN) license, whereas OpenJDK is under GPL open-source license. In practice, Oracle’s license restricts long-term commercial use (as we’ve discussed), while OpenJDK’s doesn’t.
- Support & Updates: Oracle JDK releases come with Oracle’s testing, and Oracle will provide updates for a longer timeframe (for paying customers) – up to 2031 in extended support for Java 21. The OpenJDK community releases stop earlier (in 2026 for Oracle’s OpenJDK builds, and longer for others, as mentioned). But multiple vendors step in to support OpenJDK beyond the community cutoff.
- Packaging: The Oracle JDK may include components not present in the pure open-source version – for example, it used to include JavaFX (although that is now separate) or certain monitoring tools. As of 21, there’s very little difference: Oracle JDK and OpenJDK both include Flight Recorder, etc. One subtle difference is that Oracle JDK 21 is a specific build by Oracle, tested for commercial customers, whereas “OpenJDK 21” could refer to any build from any provider that follows the open-source code.
- Compliance: Using Oracle JDK means you must adhere to the license terms and potential fees. Using OpenJDK means you just have to follow the open source license (which mainly concerns distribution, not usage).
In short, Oracle JDK vs OpenJDK 21 is not a technical decision (they will run your Java applications the same way); it’s a business decision about licensing and support. Many companies choose OpenJDK to avoid the licensing trap and because there are plenty of support options if needed. The Oracle JDK may be chosen if an organization requires Oracle’s direct support or has specific reasons to use Oracle’s builds.
How can we avoid needing an Oracle Java subscription for Java 21?
To avoid an Oracle Java SE Subscription for Java 21, you should:
- Use OpenJDK distributions wherever possible (so you’re not using Oracle’s licensed binaries at all).
- Stay within the NFTC free usage window if you do use Oracle JDK 21, and plan an upgrade path before that window closes.
- Eliminate legacy Oracle JDK usage (e.g., older Java versions in production without a license) by replacing them with open-source or newer free versions.
- Control procurement and deployment to prevent new Oracle Java usage from being introduced (via containers, third-party apps, etc.).
- Leverage free LTS and third-party support to cover your needs instead of Oracle’s paid support.
In essence, by standardizing on open source Java and only using Oracle JDK in a time-bounded, controlled way (or not at all), you can completely avoid signing up for the Oracle subscription. Many organizations have successfully done this by migrating everything to OpenJDK (some with the help of consultancies or internal effort). It might require a one-time project to switch JDKs and update processes, but it can save millions in the long run. If you must use Oracle JDK for some reason (perhaps due to specific application certification), try to isolate it and see if that specific use can be covered differently (or if the app can run on OpenJDK – often it can).
Will Java 21 be the last free LTS? (What about Java 25 and beyond?)
Oracle has indicated that the NFTC (no-fee) model will remain in place for now. Java 25 (the LTS planned for 2025) is expected to also be offered under NFTC for a period. So Java 21 is not the last free LTS; it’s part of Oracle’s new approach to alternate between free periods and pushing subscriptions. The likely pattern is:
- Java 17: free for 3 years, then paid.
- Java 21: free for 3 years (2023–26), then paid.
- Java 25: presumably free for some time (2025–2028), etc.
Oracle seems to want to incentivize customers to always move to the latest LTS (which they make free for a while) or sign up for a subscription if they want to stay on an older one. We can’t predict Oracle’s every decision, but given the pushback on the per-employee model, Oracle might continue offering NFTC as a goodwill gesture to keep developers on board. Regardless, always read the current licensing terms when a new Java release comes out. However, as of now, Java’s future LTS releases are likely to follow a similar “free then paid” cycle, unless Oracle radically changes its strategy again.
Read about our Advisory Services