Java 25 (LTS)

Java 25 (opens in a new tab)

JEP 511: Module Import Declarations (opens in a new tab)

Enhance the Java programming language with the ability to succinctly import all of the packages exported by a module. This simplifies the reuse of modular libraries, but does not require the importing code to be in a module itself.

JEP 506: Scoped Values (opens in a new tab)

Replacement for ThreadLocal variables

  • Immutability & Constrained Data Flow
  • Bounded Lifetime (No Memory Leaks)
  • Efficient Inheritance Across Threads (Especially Virtual Threads)
  • Designed for Modern Concurrency (Virtual Threads + Structured Concurrency)

JEP 518: JFR Cooperative Sampling (opens in a new tab)

Improve the stability of the JDK Flight Recorder (JFR) when it asynchronously samples Java thread stacks. Achieve this by walking call stacks only at safepoints, while minimizing safepoint bias.