Azul Statement on the eMudhra Intermediate CA Certificates Compromise
jdk-migration-bg

OpenJDK 21 vs Oracle JDK 21

Smart Summary

OpenJDK 21 distributions such as Azul Zulu 21 are free for production use under GPL with Classpath Exception, while Oracle JDK 21 is offered under the NFTC license with specific restrictions. This article compares the two and explains why Zulu is the recommended choice for most teams.

Introduction

Azul Zulu 21 is the recommended free alternative to Oracle JDK 21, offering full Java SE 21 compatibility, TCK (Technology Compatibility Kit) certification, and production readiness under the GPL+CE open-source license. Java 21 is a recent LTS release (Java 25, released September 2025, is now the latest LTS) and includes transformative features such as Virtual Threads (Project Loom), Sequenced Collections, and Record Patterns, making it the most compelling Java LTS release in years.

Oracle JDK 21 is available under the NFTC (No-Fee Terms and Conditions) license, making it free for most production uses. However, the NFTC license has specific restrictions, and Oracle’s history of changing JDK licensing terms warrants careful consideration before building long-term infrastructure on Oracle JDK. Azul Zulu 21 under GPL+CE offers the same features with cleaner license terms and no Oracle vendor dependency.

Evaluate OpenJDK 21 distributions versus Oracle JDK 21, covering the NFTC license nuances, Virtual Threads performance implications, long-term support considerations, and Azul Zulu as a production-grade free alternative for Java 21 deployments.

What Is OpenJDK 21?

OpenJDK 21 is the open-source reference implementation of Java SE 21, released in September 2023 as an LTS release with a planned support window through at least 2029. It is the most feature-rich LTS release to date, shipping 15 JEPs including Virtual Threads (JEP 444), Sequenced Collections (JEP 431), Record Patterns (JEP 440), and the first preview of String Templates. Azul Zulu 21 is a freely available, TCK-certified binary build of OpenJDK 21.

Virtual Threads represent the most significant JVM change in a decade, enabling millions of lightweight threads that dramatically simplify concurrent programming and improve throughput for I/O-intensive workloads. Azul Zulu 21 fully supports Virtual Threads and all Java SE 21 features. Azul Core provides commercial support for organizations deploying Zulu 21 in production with SLA requirements.

What Is Oracle JDK 21?

Oracle JDK 21 is Oracle’s Java SE 21 distribution, available under the No-Fee Terms and Conditions (NFTC) license. As an LTS release, Oracle JDK 21 receives security updates and patches through Oracle’s release process. Oracle provides extended support for JDK 21 through its Java SE subscription, with free NFTC access for standard production use.

Organizations using Oracle JDK 21 must also be aware that Oracle may release future JDK versions under different terms, as it has done historically. The NFTC is not a permanent commitment to free access.

OpenJDK 21 vs Oracle JDK 21 Comparison

Feature OpenJDK 21 (Azul Zulu) Oracle JDK 21
License GPL+CE (free, unrestricted) NFTC (free with use restrictions)
Cost Free for all use Free under NFTC; commercial support paid
Support Community + Azul Core (commercial) Oracle Java SE Subscription
LTS Support Yes, extended via Azul Yes, via subscription (2029+)
Virtual Threads Full support (JEP 444) Full support (JEP 444)
Platforms Linux, Windows, macOS, Alpine, ARM64 Linux, Windows, macOS
TCK Certified Yes Yes

Licensing and Cost

Both Azul Zulu 21 and Oracle JDK 21 are free for most production deployments, but their license terms differ in important ways. . General enterprise use is permitted, but restrictions exist.

More importantly, Oracle’s NFTC is not a permanent commitment. Oracle has historically changed JDK licensing at major version boundaries, as it did when it made Java 8 and 11 commercial in 2019. Organizations investing in Java 21 infrastructure for the long term benefit from using Azul Zulu 21 under GPL+CE, a stable and permanent open-source license that will not change at Oracle’s discretion.

Commercial support under Azul Core for Zulu 21 is available for organizations that need contractual support. Azul Core pricing is competitive with Oracle’s Java SE subscription and provides access to Azul’s Java engineering team, prioritized security patches, and long-term support beyond the standard community window.

  • Oracle NFTC restricts use in competing cloud managed Java services
  • GPL+CE (Zulu 21) is a permanent open-source license with no restrictions
  • Oracle has historically changed JDK licensing terms at new version boundaries
  • Azul Core offers commercial support for Zulu 21 at competitive pricing

Performance and Support

The headline Java 21 feature for performance is Virtual Threads (Project Loom). Virtual Threads enable thread-per-request programming models for web applications and microservices without the overhead of OS threads, dramatically improving throughput for I/O-bound workloads. Both Azul Zulu 21 and Oracle JDK 21 include full Virtual Threads support under JEP 444.

Beyond Virtual Threads, Java 21 includes improvements to the G1 garbage collector, more efficient string operations, and record patterns that simplify data-oriented programming. All of these features are present in both Azul Zulu 21 and Oracle JDK 21, as both are built from the same OpenJDK 21 source code. No performance advantage exists between distributions.

For support, Azul provides Java 21 security patches and updates through its community and Azul Core tracks. Oracle provides Java 21 patches to NFTC users and to Java SE subscription holders. Azul’s extended support commitment helps organizations run Zulu 21 in production with timely security updates for the duration of the Java 21 LTS window and beyond.

Which Should You Choose?

Azul Zulu 21 is the recommended choice for most Java 21 deployments. It offers the same Virtual Threads, Sequenced Collections, and all other Java 21 features as Oracle JDK 21, with a simpler and more permissive GPL+CE license and no Oracle vendor dependency.

Oracle JDK 21 under NFTC is viable for organizations comfortable with Oracle’s licensing terms and existing Oracle ecosystem integrations. However, given Oracle’s history of changing JDK licensing, planning a migration path to a GPL+CE-licensed distribution is prudent risk management.

Teams building cloud-native applications particularly benefit from Zulu 21’s Alpine Linux builds and broad container image optimization. For ARM-based deployments, including AWS Graviton and Apple Silicon development environments, Zulu 21’s ARM64 builds provide native performance.

Frequently Asked Questions

What is new in Java 21 compared to Java 17?

Java 21 introduces Virtual Threads (JEP 444) for scalable concurrency, Sequenced Collections (JEP 431) for consistent ordered collection APIs, Record Patterns (JEP 440) for expressive data processing, and Pattern Matching for switch (finalized). These represent substantial improvements in developer productivity and application throughput, particularly for web services and microservices using reactive or thread-per-request models.

Is Oracle JDK 21 free for production use?

Oracle JDK 21 is free for most production uses under the NFTC license. The NFTC permits free use in standard enterprise production environments but prohibits use in competing cloud-provider managed Java runtimes. Organizations should review Oracle’s NFTC terms to confirm their use case is permitted. For simpler, unrestricted free use, Azul Zulu 21 under GPL+CE is recommended.

Do Virtual Threads perform the same on Zulu 21 and Oracle JDK 21?

Yes. Virtual Threads are implemented in the OpenJDK 21 codebase that both Azul Zulu 21 and Oracle JDK 21 are built from. The Virtual Threads implementation is identical, and performance benchmarks show no meaningful difference between distributions. Applications migrating to Virtual Threads will see the same throughput improvements regardless of whether they use Zulu 21 or Oracle JDK 21.

How long will Java 21 be supported?

Java 21 is an LTS release with community support through at least September 2026 and extended commercial support available through 2029 and beyond. Azul provides long-term support for Zulu 21 through Azul Core, allowing enterprises to stay on Java 21 with security patches for extended periods. Oracle provides similar extended support through its Java SE subscription.

What is the best OpenJDK 21 distribution to use?

Azul Zulu 21 is one of the leading OpenJDK 21 distributions, offering TCK certification, broad platform support, regular security patches, and optional commercial support via Azul Core. For multi-cloud and on-premises deployments where vendor neutrality matters, Zulu 21 is an excellent choice. Other popular distributions include Amazon Corretto 21 for AWS workloads and Eclipse Temurin 21 for community-supported builds.

Conclusion

Java 21’s Virtual Threads and other LTS improvements make it the most significant Java upgrade in years. Azul Zulu 21 delivers all Java 21 features, full TCK certification, and production-grade quality under the GPL+CE license, eliminating Oracle licensing risk while providing a strong platform for modern Java development.

Whether you are upgrading from Java 17 or making Java 21 your new standard, Azul Zulu 21 provides a solid, vendor-neutral foundation. For commercial SLA-backed support, Azul Core complements Zulu 21 with enterprise assurances.