java licensing

How Does Java Licensing Work?

How Does Java Licensing Work

How Does Java Licensing Work?

Java licensing is no longer as straightforward as it once was. With Oracle’s changes over the years, what used to be “free” may now trigger licensing obligations—especially in production environments.

Let’s break it into practical sections to help you understand how Java licensing works today, particularly if you use Oracle JDK in an enterprise setting.


Oracle’s Dual Java Offerings

Oracle offers two distinct distributions of Java:

Oracle OpenJDK

  • License: GNU General Public License (GPL) with Classpath Exception
  • Cost: Free to use, distribute, and modify
  • Use Case: Ideal for most development and production needs
  • Support: No long-term support from Oracle (you’ll need to rely on the community or switch vendors)

Example: If you’re using OpenJDK from Oracle or another vendor (like Eclipse Temurin or Amazon Corretto) in production, there’s no fee or Oracle licensing requirement.

Oracle JDK

  • License: Varies by version (BCL, OTN, or NFTC)
  • Cost: Free in some use cases, but often requires a subscription for commercial use.
  • Use Case: Organizations that want official Oracle support and long-term update availability.

Important: The licensing model depends heavily on which version of Oracle JDK you use and for what purpose.


Oracle Java Licensing Models by Version

Different licenses govern different versions of Oracle Java. Here’s a breakdown of what you need to know:

Binary Code License (BCL) – Java 8 and Earlier (before April 2019)

  • Free Use: Yes, for general-purpose computing
  • Restricted Use: Embedded systems or commercial redistribution require a license
  • Support: Oracle ended public updates for Java 8 in January 2019 for commercial users

Example: Running Java 8u202 on internal apps in 2018 didn’t require a license. However, upgrading to 8u211 in production in 2020 without a subscription puts you out of compliance.

Oracle Technology Network (OTN) License – Java SE 8u211+ and Java 11

  • Free Use: Only for personal, development, or testing
  • Commercial Use: Requires a paid Oracle Java SE Subscription
  • Updates: Available only with an active subscription

Example: If you installed Java 11 on a production server after 2019, you need a subscription unless you use a non-Oracle distribution.

No-Fee Terms and Conditions (NFTC) – Java 17 and Java 21

  • Free Use: For all purposes (including commercial), but only for a limited time
  • Expiration: Free updates end after a certain date; after that, OTN rules apply
VersionNFTC Period EndsThen Reverts To
Java 17Sept 2024OTN (Paid)
Java 21Sept 2026OTN (Paid)

Example: If you use Java 17 today in production under NFTC, you’re fine. But after September 2024, updates require a paid license unless you freeze updates.


What Triggers a License Requirement?

Oracle licensing depends on:

  • Java version (e.g., Java 8 vs. Java 17)
  • How you use it (development vs. production)
  • Which distribution (Oracle JDK vs. OpenJDK from third-party vendors)

Commercial use of Oracle JDK in production—unless covered under NFTC within its free period—requires a subscription.

Read about Oracle Java Audit.


Non-Oracle Java Distributions (Free Alternatives)

You are not required to use Oracle’s Java distributions. Several vendors offer free and open-source Java builds under the same OpenJDK codebase.

Common Alternatives

  • Amazon Corretto (Free, supported by AWS)
  • Eclipse Temurin (Adoptium project)
  • Red Hat Build of OpenJDK
  • Zulu OpenJDK by Azul

These alternatives are:

  • Free for commercial use
  • Fully compliant with OpenJDK
  • Often provide long-term support

Example: A company running Corretto 11 in production must not worry about Oracle’s licensing.


Java SE Subscription: What You’re Buying

Oracle’s commercial product is a Java SE Subscription. Here’s what it includes:

What You Get

  • Right to use Oracle JDK in production
  • Access to performance, stability, and security updates
  • Bug fixes and support from Oracle
  • Support for older versions (Java 8 and beyond)

How It’s Priced

As of 2023:

  • Per-Employee Model: Based on the total number of employees (not Java users)
  • No longer tied to processors or devices

Pricing Example (as of mid-2023):

  • $15 per employee/month for 1-999 employees
  • Lower tiers for larger headcounts

What Counts as an Employee?

Oracle’s definition includes:

  • Full-time, part-time, temporary, and third-party contractors
  • Even if they don’t use Java directly

Example: A company with 500 employees must license all 500, even if only 100 use Java.


Common Compliance Risks

Organizations often become non-compliant by:

  • Upgrading Oracle JDK without understanding new license terms
  • Using Oracle Java 8u211+ in production without a subscription
  • Running Java on production servers under the OTN license
  • Assuming old BCL terms still apply

Real-World Risk Scenarios

  • Updating Java 8 to 8u311 for security and unknowingly triggering the OTN license
  • Running Java 11 in test → then migrating the same instance to production
  • Thinking NFTC covers perpetual commercial use (it doesn’t—only for the free window)

Should You Use Oracle Java?

It depends on your needs:

Use Oracle JDK if you:

  • Require Oracle support
  • Need consistent updates and patching
  • Are using Java in mission-critical enterprise apps
  • Are contractually obligated to use Oracle Java

Use OpenJDK if you:

  • Don’t need Oracle support
  • Want to avoid license costs
  • Are you comfortable with community support or other vendors

Best Practices for Managing Java Licensing

To stay compliant and cost-effective:

1. Perform a Java Inventory

  • Identify all Java versions in use
  • Determine the distribution (Oracle JDK vs. OpenJDK)
  • Review installation paths and update histories

2. Check License Agreements

  • Understand what license governs your Java version
  • Flag any production use under OTN or expired NFTC

3. Switch to OpenJDK (if appropriate)

  • Migrate to OpenJDK-based builds like Corretto or Temurin
  • Validate compatibility before switching

4. Lock Java Versions

  • Avoid auto-updating Oracle JDKs without reviewing licensing changes
  • Freeze major versions to avoid falling into a subscription trap

5. Plan for NFTC Expiration

  • Track the NFTC period for Java 17, 21, and future versions
  • Budget for a potential license or plan to migrate to a free build

Summary: Key Takeaways

  • Oracle Java is not free for commercial production unless you fall under a current NFTC window.
  • OTN License restricts production use and requires a subscription.
  • NFTC License allows free commercial use temporarily—but it expires.
  • Binary Code License (BCL) applies only to older versions like Java 8 pre-2019.
  • Java SE Subscription gives you usage rights and support—but is priced per employee.
  • OpenJDK builds from third-party vendors are viable, cost-free alternatives for most organizations.

Read about the Oracle java licensing changes in 2024.


Final Thoughts

Java remains open, but Oracle’s branded JDK comes with strings attached. Many organizations are unknowingly out of compliance simply by running the latest Oracle Java update in production.

The key is to control updates, understand your licensing boundaries, and evaluate alternatives before committing to Oracle’s subscription model.

If your company hasn’t done a Java audit recently, now is the time. Oracle has become increasingly aggressive in pushing Java audits—especially when clients purchase other Oracle products. Being proactive today avoids expensive surprises tomorrow.

Do you want to know more about our Oracle Java Advisory Services?

Please enable JavaScript in your browser to complete this form.

Author

  • Fredrik Filipsson

    Fredrik Filipsson spent 10 years at Oracle and has since spent another 10 years advising on Oracle software and cloud licensing. He’s recognized as a leading expert in the industry and is a trusted advisor to some of the world’s largest companies.

    View all posts