Java 25 LTS: What’s New

Java 25 is now available as a Long-Term Support (LTS) version since September 16th, and it comes with changes: developing simple programs is easier, apps start faster, consume less memory, and diagnosing problems is simpler. In addition, IDEs like IntelliJ IDEA already support it from day one, so getting started is a matter of minutes.

What’s new

  • Compact source files and “instance” main: you can create examples, utilities, and prototypes without the usual ceremony; less boilerplate and more focus on logic. Ideal for learning, making quick demos, or proof of concept.
  • Module imports: no more struggling with repeated imports when you use many classes from the same module; a cleaner way to organize your sources in examples and prototypes.
  • More flexible constructors: you can now validate or prepare data before calling super(), which makes certain designs more natural without strange tricks.

Concurrency and context

  • Scoped Values: a modern alternative to ThreadLocal designed for virtual threads; sharing immutable data between calls and child tasks is easier and safer.

Performance

  • Faster startup: the JVM can use profiles from previous executions to perform better right from the start, reducing the time to “cruising speed.”
  • Less memory per object: “compact headers” reduce the footprint, something noticeable in services with many small objects and elastic deployments.
  • Smoother GC: Shenandoah is now generational and there are improvements in class loading/linking, which helps to reduce pauses in server-type loads.

Better observability (diagnosing is easier)

  • JFR with cooperative sampling and method traces/times: more accurate profiles with less impact and more detail to track what your app is doing when it’s “running tight.”

If you’re coming from Java 21, you’ll also find

  • Stream Gatherers (custom intermediate operations), JavaDoc in Markdown, anonymous variables with “_” and improvements in virtual threads (without “pinning” when synchronizing).

Ready to use now in your IDE

  • In IntelliJ IDEA you can download the JDK 25 from the IDE itself and set the “Language level: 25 – Compact source files, module imports”; full support for the new aids and quick-fixes.
  • Structured concurrency (preview): organize concurrent tasks as a unit, with more readable code and better managed cancellation/errors.
  • Patterns with primitive types (preview): unifies how we use instanceof and switch with primitives, simplifying logic and avoiding unnecessary conversions.
  • Stable Values (preview): immutable objects that the JVM can optimize as “constants,” improving performance in repetitive scenarios.
  • Vector API (incubator): vector operations that take advantage of CPU SIMD to accelerate numerical and data calculations.
  • Security: PEM encodings and KDF API: native support for PEM formats and new key derivation functions to strengthen crypto management.
  • AOT Command‑Line Ergonomics: facilities to generate AOT caches and improve startup time without complicating the build flow.
  • Calendar and LTS support: long-term support and periodic updates that provide stability for planning adoption.
AUTHOR
Picture of Luis

Luis

Brand, Marketing & Events manager
Did you like this entry? Share it

Similar news

Cloudflare: The Security Secret Behind 100 Lava Lamps

Cloudflare uses a "wall" with 100 lava lamps and a camera to capture randomness from the physical world and strengthen ...

Acrobat Studio: PDF Enters the Age of AI

ChatGPT 5 (GPT-5): News and Uses

Cloudflare: The Security Secret Behind 100 Lava Lamps

Cloudflare uses a "wall" with 100 lava lamps and a camera to capture randomness from the physical world and strengthen ...

Acrobat Studio: PDF Enters the Age of AI

Scroll to Top