Java 25 vs. Java 24: What Changed, What Matured, and Should You Upgrade?

August 11, 2026 0 By Sergio Salmeron

Java’s six-month release cadencia keeps shipping new JEPs. But not every release carries the mismo weight. Java 24 (March 2025) was a feature-rich short-term release, while Java 25 (septiembre 2025) is the reciente Long-Term Soporte (LTS) versión — the one most enterprise teams will actually plan their upgrade path around. This is a comparison of their strengths for java software desarrollo.

Release Basics

Java 24Java 25
Release dateMarch 18, 2025September 16, 2025
Release typeShort-term (non-LTS)LTS (8+ years of support)
JEP count24 JEPs16–18 JEPs
Preview features74
Experimental features21

The practical implication: Java 24 was a proving ground for a lot of in-progress work, and Java 25 is where several of those features either graduated to final status or advanced another preview round.

Java 24 Recap: The Highlights

Java 24 was unusually large for a short-term release, with 24 JEPs spanning language, performance, and security work.

Language and API:

  • Stream Gatherers (JEP 485) — finalized, letting developers write custom intermediate stream operations.
  • Class-File API (JEP 484) — finalized, giving tooling authors a standard way to parse and generate bytecode.
  • Primitive Types in Patterns, instanceof, and switch, 2nd Preview (JEP 488).
  • Structured Concurrency, 4th Preview (JEP 499).
  • Scoped Values, 4th Preview (JEP 487).
  • Flexible Constructor Bodies, 3rd Preview (JEP 492).

Performance and runtime:

  • Ahead-of-Time Class Loading & Linking (JEP 483) — meaningfully cuts startup time for short-lived programs.
  • Compact Object Headers, Experimental (JEP 450) — shrinks object headers from 96–128 bits down to 64 bits on 64-bit JVMs.
  • Generational Shenandoah, Experimental (JEP 404).
  • Synchronize Virtual Threads without Pinning (JEP 491) — a big deal for Loom users, since it removes most monitor-related pinning that previously stalled carrier threads.

Security:

  • Two quantum-resistant cryptography JEPs (ML-KEM and ML-DSA, JEPs 496 and 497).
  • Permanently Disable the Security Manager (JEP 486).

Java 25: What’s New or Advanced

Java 25 is a leaner release by JEP count, but it’s the one that matters for production planning since it’s LTS.

Finalized in Java 25:

  • Scoped Values (JEP 506) — finalized after four preview rounds in Java 24. This is the biggest maturity milestone in the release: scoped values are now a stable, production-ready alternative to ThreadLocal for sharing immutable data across threads, especially virtual threads.
  • Structured Concurrency (JEP 505) — reached its 5th preview, with StructuredTaskScope now considered a standard API pattern for coordinating related concurrent tasks as a single unit of work.
  • Compact Source Files and Instance Main Methods (JEP 512) — finalized, simplifying the classic “hello world” onboarding experience for new Java learners.
  • Module Import Declarations (JEP 511) — finalized, making it easier to import all packages exported by a module in one line.
  • Flexible Constructor Bodies (JEP 513) — finalized after three previews, allowing statements before this()/super() calls under certain conditions.

Still in preview:

  • Primitive Types in Patterns, instanceof, and switch, 3rd Preview (JEP 507) — one step closer to final, extending pattern matching to all primitive types.
  • Stable Values, Preview (JEP 502) — a new API for values that are computed at most once and then treated as constants.

Performance:

  • Ahead-of-Time Command-Line Ergonomics (JEP 514) and Ahead-of-Time Method Profiling (JEP 515) — both build on Java 24’s AOT class loading work, letting the JIT start generating optimized native code immediately at startup rather than warming up cold.
  • Compact Object Headers (JEP 519) — continues as an experimental feature, still trimming JVM memory overhead.

Security:

  • Key Derivation Function API (JEP 510) — finalized, standardizing cryptographic key derivation that was in preview in Java 24 (JEP 478).

Housekeeping:

  • Removal of the 32-bit x86 port (JEP 503), completing the deprecation path started in Java 24.

Head-to-Head: Features That Evolved Across Both Releases

FeatureJava 24Java 25
Scoped Values4th PreviewFinal
Structured Concurrency4th Preview5th Preview
Primitive Types in Patterns2nd Preview3rd Preview
Flexible Constructor Bodies3rd PreviewFinal
Module Import Declarations2nd Preview (as “Simple Source Files…”)Final
Key Derivation Function APIPreviewFinal
Compact Object HeadersExperimentalExperimental (continued)
Ahead-of-Time optimizationsClass loading & linkingCommand-line ergonomics + method profiling

Should You Upgrade?

For teams on Java 21 (the previous LTS), Java 25 is the natural next stop — it’s the versión vendors will support long-term, and it finalizes several features that were still experimental in Java 21 and Java 24, most notably Scoped Values. If you already adopted Java 24 for its AOT class loading or virtual-thread pinning fix, moving to Java 25 is low-friction since most in-flight previews simply advanced rather than changed direction. This aligns with java software desarrollo best practices for stable tooling and long-term support.

Teams specifically relying on virtual threads at scale should also read up on structured concurrency’s 5th preview — it’s the closest that API has been to a stable, standard concurrency model since Project Loom began.


Sources: Oracle — The Arrival of Java 25, OpenJDK JDK 25 project page, OpenJDK JDK 24 project page, Oracle — The Arrival of Java 24, Oracle — Java 25 Release Announcement, Oracle — Java 24 Release Announcement