Monday, September 29, 2025

Java™ SE Development Kit 25

JDK 25

JDK 25 reached General Availability on 16 September 2025. 

Production-ready binaries under the GPL are available from Oracle

JDK 25 is a long-term support (LTS) release from most vendors. For a complete list of the JEPs integrated since the previous LTS release, JDK 21, please see here.

Binaries from openJDK are available here:

https://jdk.java.net/25/

https://openjdk.org/projects/jdk/25/

Release notes from Oracle

https://www.oracle.com/java/technologies/javase/25-relnote-issues.html


🚀 What JDK 25 brings

Major new additions / enhancements:

  • Compact Object Headers (JEP 519): reduces object header size for many objects on 64-bit platforms → lower memory and better heap density. Java Code Geeks+1

  • Scoped Values (JEP 506): a safer/more efficient alternative to ThreadLocal for context propagation, especially with virtual threads. Java Tech Online+1

  • Flexible Constructor Bodies (JEP 513): allows code before super()/this() in constructors. HappyCoders.eu

  • Compact Source Files & Instance Main Methods (JEP 512): lets you write simpler top-level code without class boilerplate (good for learning, quick scripts). Java Tech Online

  • Primitive Types in Patterns (JEP 507, preview): pattern matching now supports primitives (int, double, etc.). Baeldung on Kotlin+1

  • Performance & runtime enhancements:

    • Generational Shenandoah GC (JEP 521) becomes supported. Java Code Geeks

    • JDK Flight Recorder (JFR) improvements: better CPU-time profiling, method timing & tracing. Java Tech Online+1

  • Security / cryptography: Key Derivation Function API (JEP 510) finalised to support modern cryptograpic workflows. JDK Builds

  • Module import declarations (JEP 511): easier modular code reuse/imports. Java Tech Online

  • JDK 25 is also an LTS release. OpenJDK+1

What this means for you:

  • Significant runtime and memory improvements: if you manage large scale Java services you’ll likely benefit from Compact Object Headers, improved GC, and profiling tools.

  • More expressive language features continue to expand.

  • Better support for modern concurrency/context propagation (via Scoped Values) which ties into virtual threads.

  • If you build frameworks or libraries, features like Module Import Declarations may reduce boilerplate for users.

  • The migration path from 21 → 25 is relevant because many new features are production-ready (no longer preview) so you may want to plan early.


📋 Side-by-side comparison

CategoryJDK 21JDK 25
StatusLTS (Sep 2023)LTS (Sep 2025)
Major concurrency additionVirtual threads finalised HowToDoInJava+1Scoped Values finalised; further concurrency ecosystem improvements Java Code Geeks+1
Language expressivenessRecord patterns, switch pattern matching, sequenced collections Baeldung on KotlinAdds flexible constructors, primitive types in patterns (preview), compact source files Java Tech Online
Performance / runtimeImproved JVM generally, new APIsCompact object headers, generational Shenandoah GC, better profiling tools Java Code Geeks
Cryptography/securityKEM API introduced InfoWorldKey Derivation Function API final, better security readiness JDK Builds
Library & toolingGood improvementsModule import declarations, further enhancements in tooling and observability Java Tech Online
Preview features statusMany preview (string templates, unnamed classes) Baeldung on KotlinSome features still preview/incubator (primitive types in patterns) Java Tech Online
Migration / production readinessVery production-ready at releaseAlready production-ready for many features, but some still in preview – evaluate accordingly

No comments:

Post a Comment

The Engine and The Network: How NVIDIA's New Hardware Is Powering the AI Future and 6G

  The Engine and The Network: How NVIDIA's New Hardware Is Powering the AI Future and 6G The era of simply training bigger AI models is ...