Should I migrate off Java 11 now — to 17, 21, or 25?

As of 2026-03-18, Oracle JDK 11 Premier Support ended September 2023 and Eclipse Temurin 11 full support ended October 2024, leaving teams still on Java 11 without actively maintained free builds from the two most common distributions. Spring Boot 2.x reached EOL in November 2023 and Spring Boot 3.x requires Java 17 as a minimum. The migration target decision is urgent: Oracle JDK 17 Premier Support and Oracle JDK 21 NFTC free licensing both expire September 2026, while Java 25 LTS (released September 2025) is now available free under Oracle NFTC until September 2028. Teams on Java 11 must choose between migrating to Java 17 LTS (incremental but short Oracle runway), Java 21 LTS (stable, widely adopted, virtual threads), or Java 25 LTS (newest LTS, longest Oracle free window).

Java 21 — virtual threads and Spring Boot 3.2+ support make it the practical target. 25 is too early. 17 is just a stepping stone.

Blockers

Who this is for

Candidates

Migrate to Java 21 LTS

Java 21 LTS (released September 2023) is the most widely adopted post-11 LTS, with virtual threads (JEP 444, GA), record patterns, sequenced collections, and generational ZGC finalized. As of 2026-03-18, Oracle JDK 21 free use under the NFTC ends September 2026; teams should use Eclipse Temurin 21 (EOL December 2029) or Amazon Corretto 21 (EOL October 2030) for long-term cost-free builds. Spring Boot 3.x is fully compatible with Java 21. The decisive differentiator is virtual threads enabling high-concurrency thread-per-request workloads without reactive rewrites, now production-stable across major Java frameworks.

When to choose

Best for enterprise + high-scale teams running Spring Boot 3.x workloads where virtual threads are a concrete throughput goal and the team wants the largest post-11 LTS ecosystem of tooling, community resources, and library compatibility matrices. The single most decisive factor is whether proven, broad ecosystem adoption outweighs the need for the longest possible Oracle free-license runway.

Tradeoffs

Pros: largest post-11 LTS adoption base, virtual threads GA and production-proven, full Spring Boot 3.x compatibility, strong tooling support in IntelliJ and VS Code, Corretto 21 free until October 2030 and Temurin 21 free until December 2029. Cons: Oracle JDK 21 NFTC free use ends September 2026 forcing distribution switch to Temurin or Corretto imminently; strong encapsulation of JDK internals (JEP 403, enforced since Java 17) breaks sun.* reflection access and requires a dependency audit with jdeps before migration; Security Manager removed.

Cautions

As of 2026-03-18, Oracle JDK 21 NFTC free use ends September 2026; teams on Oracle's own distribution must switch to Temurin or Corretto before that date to avoid OTN licensing obligations. The javax.* to jakarta.* namespace migration is a Spring Boot 3 concern that commonly lands in the same upgrade window as the JDK upgrade and can simultaneously affect Hibernate, Jakarta Mail, and servlet-tier code — plan both tracks together to avoid double-touching the same code.

Migrate to Java 25 LTS

Java 25 LTS (released September 16, 2025) is the current Oracle LTS, delivering 18 JEPs including module import declarations, flexible constructor bodies, primitive types in patterns, and compact source files. As of 2026-03-18, Oracle JDK 25 is free for all uses under the NFTC until September 2028; Amazon Corretto 25 is free until October 2032 and Eclipse Temurin 25 is free until September 2031. The decisive differentiator is the longest Oracle NFTC free-use runway of any current LTS combined with the most future-proof upgrade positioning, at the cost of a 6-month-old ecosystem.

When to choose

Best for enterprise + low-ops teams starting a greenfield Java service or undertaking a full platform modernization where the team can invest in verifying Spring Boot and framework compatibility with Java 25 before committing. The single most decisive factor is whether avoiding a second JDK upgrade cycle within 2–3 years justifies the additional ecosystem-readiness verification work today.

Tradeoffs

Pros: longest Oracle NFTC free-use window currently available (until September 2028), Corretto 25 free until October 2032, sidesteps both the Java 17 and Java 21 Oracle licensing cliffs expiring September 2026, consolidates all features from Java 12–25 in a single jump, best long-term positioning. Cons: ecosystem is 6 months old as of 2026-03-18 with fewer community Q&A resources and battle-tested production reports than Java 21; framework compatibility requires explicit verification; build toolchain plugins (Maven compiler plugin, Gradle toolchains) may require version bumps to recognize Java 25.

Cautions

As of 2026-03-18, Java 25 LTS is 6 months old; Spring Boot, Quarkus, and Micronaut compatibility should be verified in each framework's official release notes before adopting in production. Oracle JDK 25 NFTC free access transitions to OTN License in September 2028 — if avoiding Oracle licensing fees beyond that date is a requirement, plan a distribution switch to Temurin 25 or Corretto 25 before that window closes.

Migrate to Java 17 LTS (Incremental Path)

Java 17 LTS (released September 2021) is the minimum Java version required by Spring Boot 3.x and presents the smallest breaking-change surface from Java 11, with strong encapsulation of JDK internals (JEP 403) and Security Manager deprecation as the main migration hurdles. As of 2026-03-18, Oracle JDK 17 Premier Support ends September 2026 (6 months away); teams must use Eclipse Temurin 17 (EOL October 2027) or Amazon Corretto 17 (EOL October 2029) for ongoing free updates. The decisive differentiator is the most predictable migration scope for large legacy codebases under delivery pressure, at the cost of a likely follow-on upgrade to Java 21 or 25 within 18–24 months.

When to choose

Best for enterprise + monorepo teams with large Java 11 codebases that need to unblock Spring Boot 3.x adoption immediately and cannot absorb the testing risk of a two-version skip within the current delivery window. The single most decisive factor is whether reducing migration scope and near-term risk justifies the additional long-term cost of a two-step upgrade strategy.

Tradeoffs

Pros: smallest breaking-change delta from Java 11 of the three candidates, sealed classes, records, text blocks, and pattern matching instanceof all GA, Spring Boot 3.x compatible immediately, Corretto 17 free until October 2029 and Temurin 17 free until October 2027. Cons: Oracle JDK 17 Premier Support ends September 2026 requiring immediate switch to Temurin or Corretto to avoid OTN licensing; choosing Java 17 today almost certainly means a follow-on upgrade to Java 21 or 25 within 18–24 months, making the total migration cost higher than migrating directly to Java 21 or 25 now.

Cautions

As of 2026-03-18, Oracle JDK 17 Premier Support expires in September 2026; teams must plan to run on Temurin 17 or Corretto 17 rather than Oracle JDK 17 immediately. Teams migrating to Spring Boot 3.x alongside the Java 17 upgrade must simultaneously address the javax.* to jakarta.* namespace change, which affects Hibernate, Jakarta Mail, and all servlet-tier code regardless of which target JDK version is chosen.

Facts updated: 2026-03-18
Published: 2026-03-29

Try with your AI agent

$ npm install -g pocketlantern
$ pocketlantern init
# Restart Claude Code, Cursor, or your MCP client, then ask:
# "Should I migrate off Java 11 now — to 17, 21, or 25?"
Missing something? Request coverage