Skip to main content

Java Versions Explained: JDK 8, 11, 17, 21, 25, 26, 27 and Beyond

Java’s release model changed fundamentally in 2017. Instead of multi‑year gaps between major versions, a new JDK ships every six months—predictably, like clockwork. Some of these are Long‑Term Support (LTS) releases, and some are Feature Releases that deliver incremental innovations without a long support tail.

Understanding this rhythm is essential for every Java engineer. It determines which version you install on your machine, which version your CI pipeline runs, and which version your production JVMs target. This guide explains the Java release cadence, the landmark LTS versions, the role of feature releases like JDK 26 and JDK 27, and how to make pragmatic version decisions for real‑world projects.

1. Java Release History at a Glance​

1996 ─ Java 1.0 (First public release)
2004 ─ Java 5 (Generics, annotations, enhanced for‑loop)
2014 ─ Java 8 (LTS) (Lambdas, Streams, Optional, new Date/Time API)
2017 ─ Java 9 (Modules, JShell)
2018 ─ Java 11 (LTS) (HTTP Client, first long‑term post‑8 release)
2021 ─ Java 17 (LTS) (Sealed classes, strong encapsulation)
2023 ─ Java 21 (LTS) (Virtual threads, record patterns, sequenced collections)
2025 ─ Java 25 (LTS) (Latest LTS baseline)
2026 ─ Java 26 (Feature Release)
2026 ─ Java 27 (Feature Release)

Before 2017, releases were major events that arrived every three to five years. Today, new JDK versions are produced twice a year, giving developers faster access to language improvements, JVM optimizations, and new APIs while providing stable LTS anchors for enterprises.

2. Oracle’s Modern Release Model​

Java’s release train is simple:

Feature Release → Feature Release → LTS → Feature Release → Feature Release → LTS ...
23 24 25 26 27 29
  • Feature Releases (March and September) – include new language features, APIs, JVM enhancements, and bug fixes. They are production‑quality but receive updates only until the next feature release arrives. Oracle provides these binaries under the Oracle No‑Fee Terms and Conditions (NFTC) for free production use.
  • LTS Releases (every two years, e.g., 21, 25, 29) – designated for extended support. Vendors like Oracle, Eclipse Adoptium, Amazon, and Azul offer years of security patches and backported fixes. LTS versions are the recommended choice for most production deployments.

This model balances rapid innovation (feature releases) with the stability and predictability that enterprises require (LTS).

3. Understanding LTS Releases​

Long‑Term Support means that a version will receive security and stability updates for several years, often five or more, depending on the vendor. Enterprises standardize on LTS releases because:

  • Stability – the feature set is frozen, and only critical fixes are backported.
  • Security – vulnerabilities are patched promptly, keeping deployments safe without a major upgrade.
  • Vendor support – commercial support contracts, compliance requirements, and internal tooling are typically validated against specific LTS versions.
  • Predictable upgrade cycles – organizations can plan migrations every two to three years rather than every six months.

New projects should start on the latest LTS unless a specific library or framework requires an older version.

4. Major Java Versions​

JDK 8 (March 2014)​

Java 8 was a watershed release that reshaped how Java developers write code:

  • Lambda expressions – enabled functional programming patterns and paved the way for the Stream API.
  • Stream API – declarative processing of collections with filter, map, reduce.
  • Optional – a container for values that may be absent, reducing null‑related bugs.
  • New Date and Time API (java.time) – finally replaced the flawed java.util.Date.

Java 8 remained the dominant version for nearly a decade because it introduced such a large productivity leap, and many legacy systems still run on it. However, the ecosystem has moved on, and running an unsupported JDK 8 is a security risk.

JDK 11 (September 2018)​

JDK 11 was the first LTS release after the new six‑month cadence. It modernized the platform while removing several deprecated modules (Java EE and CORBA). Key additions:

  • HTTP Client (standard) – a modern, non‑blocking HTTP client that supports HTTP/2 and WebSocket.
  • Local‑variable syntax for lambda parameters – the var keyword could now be used in lambda expressions.
  • Flight Recorder – low‑overhead profiling moved from commercial to open‑source.
  • Performance improvements – significant optimizations to the G1 garbage collector and the JIT compiler.

Many enterprises migrated directly from 8 to 11, making it the most widely deployed post‑8 version for years.

JDK 17 (September 2021)​

JDK 17 cemented the modern Java renaissance:

  • Sealed classes – restrict which classes can extend or implement a given type, enabling exhaustive pattern matching.
  • Pattern matching for instanceof – eliminates the boilerplate cast after an instanceof check.
  • Strong encapsulation – the module system locked down internal APIs (JEP 403), improving security and maintainability.
  • New macOS rendering pipeline – better integration with Apple Silicon.
  • Restored Apple Silicon support – through the JEP 391 backport.

JDK 17 is the current baseline for many Spring Boot 3.x and Jakarta EE 10 applications.

JDK 21 (September 2023)​

JDK 21 is a landmark LTS release that introduces some of the most significant concurrency and programming model improvements since Java 8:

  • Virtual threads – lightweight threads managed by the JVM, enabling millions of concurrent tasks with dramatically reduced resource overhead.
  • Record patterns – destructure records in pattern matching, making data‑oriented programming cleaner.
  • Pattern matching for switch – use patterns in switch expressions and statements, with exhaustiveness checks.
  • Sequenced collections – interfaces that provide a uniform way to access first and last elements of ordered collections.
  • Structured concurrency (preview) – treat groups of related tasks as a single unit of work, improving observability and cancellation.
  • Scoped values (preview) – a modern alternative to thread‑local variables for sharing immutable data.

JDK 21 represents the target for many organizations currently on 17, and it is the recommended LTS for anyone building new systems today.

JDK 25 (September 2025)​

JDK 25 is the latest Long‑Term Support release. It continues the trajectory of JDK 21, solidifying language features that were previously in preview, and delivering runtime and performance improvements accumulated across feature releases 22, 23, and 24.

For new enterprise projects, JDK 25 is the recommended baseline. It receives extended support from major vendors, ensuring security and stability for years to come. Adopting JDK 25 gives you the most modern, secure, and performant Java platform while maintaining the predictability of an LTS.

JDK 26 (March 2026)​

JDK 26 is a Feature Release that follows JDK 25. It does not carry long‑term support but offers incremental innovations to the Java language, JVM, and libraries.

  • Purpose – allow developers to evaluate and experiment with the latest platform improvements without waiting for the next LTS.
  • Licensing – available under the Oracle No‑Fee Terms and Conditions (NFTC), free for production use and redistribution.
  • Support window – Oracle plans to provide updates until September 2026, when it is superseded by JDK 27.

Organizations running JDK 25 LTS may use JDK 26 in development or testing environments to preview features that will mature in a future LTS. It is not recommended for long‑lived production deployments where you depend on extended security patches.

JDK 27 (September 2026)​

JDK 27 is the next Feature Release, arriving six months after JDK 26. Like all feature releases, it delivers incremental improvements to the language, JVM, tooling, and platform.

  • Role – continues the six‑month innovation cadence, building on JDK 26.
  • Intended audience – developers who want early access to the newest Java capabilities and are willing to upgrade every six months.
  • Production use – while supported under NFTC, it receives updates only until March 2027. Enterprises on JDK 25 LTS often evaluate JDK 27 while planning their upgrade path toward the next LTS (JDK 29).

Avoid speculating about specific JEPs that are not yet finalized; the key point is that JDK 27 is a feature release, not an LTS, and should be treated accordingly.

5. Choosing the Right JDK Version​

Your choice depends on your goals:

ScenarioRecommended Version
Learning Java todayLatest LTS (JDK 25)
New enterprise projectLatest LTS (JDK 25)
Existing enterprise project (on 17 or 21)Current supported LTS until migration is planned
Evaluating the newest Java featuresLatest Feature Release (JDK 26 or JDK 27)
Legacy system maintenanceCurrently supported LTS; plan migration

Use LTS for production systems. You get stable behavior, security patches, and broad ecosystem support. Feature releases are perfect for your personal toolchain, side projects, and CI matrices where you test compatibility early.

6. Upgrading Between Java Versions​

Java’s strong backward compatibility means most applications run on newer JVMs without code changes. That said, responsible upgrades require a plan:

  1. Audit dependencies – ensure all libraries and frameworks (Spring Boot, Hibernate, etc.) support the target JDK.
  2. Check for removed APIs – the JDK occasionally removes deprecated packages (e.g., java.xml.ws). Tools like jdeprscan identify potential issues.
  3. Update build tools – Maven and Gradle need up‑to‑date compiler plugin settings and wrapper configurations.
  4. Run tests – a full test suite on the new JDK catches regressions early.
  5. Monitor in staging – use JFR and GC logs to verify performance characteristics haven’t degraded.
  6. Gradually roll out – canary deployments let you compare metrics between the old and new JDKs.

A typical upgrade path for enterprises is LTS‑to‑LTS: 8 → 11 → 17 → 21 → 25. Some organizations skip intermediate LTS versions, but doing so increases risk and testing scope.

7. Choosing a JDK Distribution​

All modern JDK distributions are built from the same OpenJDK source code. The differences lie in packaging, support, and additional features.

DistributionKey Characteristics
Oracle JDKOfficial Oracle build; free for production under NFTC (17+)
Eclipse TemurinEclipse Adoptium project; TCK‑tested, community‑driven
Amazon CorrettoFree, long‑term support; AWS‑optimized (but runs everywhere)
Azul ZuluBroad platform support; commercial support available
Microsoft Build of OpenJDKUsed internally by Azure; freely available
Red Hat OpenJDKDefault on RHEL; supported by Red Hat

For most developers, Eclipse Temurin or Amazon Corretto are excellent, vendor‑neutral choices. Your organization’s IT policy may prescribe a specific distribution.

8. Frequently Asked Questions​

Should beginners learn JDK 17, JDK 21, or JDK 25?
Learn on the latest LTS, which at the time of writing is JDK 25. The fundamentals are identical, and you get the most modern tooling and features.

Is Java 8 still relevant?
It is still widely deployed, but it is no longer supported for free by Oracle, and many modern libraries have moved on. New development should target a recent LTS.

Is JDK 21 production‑ready?
Yes. It is a mature LTS release with broad ecosystem support. Many organizations run it in production today, though JDK 25 is the latest LTS.

Is JDK 25 the best choice for new projects?
Yes. It is the latest LTS, giving you the longest support window and all modern Java features.

Should I use JDK 26 or JDK 27 in production?
They are Feature Releases with a short support window. They are fine for applications that can upgrade every six months, but LTS versions are recommended for most production systems.

Can multiple JDK versions coexist on one machine?
Yes. Install them in separate directories and use the IDE’s SDK manager or a tool like sdkman (Linux/macOS) or jEnv to switch.

How do I switch between JDK versions?
Modify the JAVA_HOME environment variable and update your PATH so the desired java executable appears first. IDEs allow per‑project SDK selection.

Do old Java applications always run on a new JDK?
Most do. Java’s backward compatibility is exceptional, but you should test and watch for deprecated or removed APIs.

9. Best Practices​

  • Prefer the latest LTS for new projects and production deployments.
  • Use feature releases for evaluation – run your CI pipeline against JDK 26 or JDK 27 early to surface compatibility issues.
  • Align development and production versions – developing on a different major version than production causes subtle bugs.
  • Test before upgrading – run a full suite of unit, integration, and performance tests on the target JDK.
  • Stay current with security patches – apply CPU (Critical Patch Update) releases regularly.
  • Verify framework compatibility – major Spring Boot releases are tied to JDK baselines.
  • Document your supported Java versions in project README files and build configurations.

10. Next Steps​

With a clear picture of the Java version landscape, you are ready to set up your environment:

11. Key Takeaways​

  • Java ships a new version every six months: Feature Releases in March and September, with an LTS release every two years.
  • LTS versions (17, 21, 25) are the recommended choice for most production workloads because they receive long‑term security updates.
  • Feature Releases like JDK 26 and JDK 27 let you preview the latest innovations, but have a short support window.
  • Upgrading is generally safe, but requires dependency checks and thorough testing.
  • New projects should start on the latest LTS, which is JDK 25 at the time of writing.

Choosing the right Java version is an engineering decision that affects security, performance, and development velocity. Armed with this guide, you can make that decision with confidence.