Java 25 is the next long-term support (LTS) release of the Java platform, officially released (General Availability) on September 16, 2025. It is a major milestone, introducing enhancements across the language, standard libraries, APIs, and runtime — 18 JEPs (JDK Enhancement Proposals) in total, including 5 features targeting AI development, multiple preview and incubator features, plus performance optimizations and security improvements. These changes aim to boost developer productivity, application performance, and security, with particular support for post-quantum cryptography (PQC) and AI-related workloads.
Compared with the previous LTS release, Java 21, Java 25 accumulates iterations from multiple intermediate versions, including further refinements to pattern matching, maturation of virtual threads, and runtime optimizations. Upgrading from an earlier version also brings features added in between, such as the Foreign Function & Memory API.
Below is a list of the major new features in Java 25, compiled from official JEPs and reliable sources (Oracle, OpenJDK, and InfoWorld), presented as a table for easy comparison. Feature types (Standard/Preview/Incubator/Experimental) and brief impact are noted.
| JEP | Feature | Type | Description | Impact & Benefits |
|-----|---------|------|-------------|-------------------|
| JEP 509 | JFR CPU-Time Profiling | Experimental | Uses kernel CPU timers on Linux to capture CPU-time profiling of Java programs, enhancing JFR (JDK Flight Recorder). | Helps developers diagnose performance bottlenecks more precisely on Linux; may extend to other platforms later. |
| JEP 510 | PEM Encodings of Cryptographic Objects | Standard | Supports Privacy-Enhanced Mail (PEM) encoding of cryptographic objects, per RFC 5705 and RFC 8446. | Strengthens TLS/SSL security and modern cryptography workflows. |
| JEP 511 | Structured Concurrency (Third Preview) | Preview | Third preview of structured concurrency, supporting try-with-resources-style management of concurrent tasks. | Simplifies multithreaded code, reduces concurrency bugs, improves readability and reliability. |
| JEP 512 | Compact Object Headers | Standard | Compresses object headers, reducing size from 12 bytes to 8 bytes. | Significantly lowers memory usage, especially in high-object-density applications; positive effects on GC and performance. |
| JEP 513 | Ahead-of-Time Command-Line Ergonomics | Standard | New JVM flag -XX:AOTCacheOutput; disables dynamic features to evaluate AOT compilation compatibility. | Paves the way for future AOT compilation, helps identify reflection/class-loading issues, supports Project Leyden's static image generation. |
| JEP 514 | Key Derivation Functions | Standard | New API for key derivation functions (KDF), a building block for post-quantum cryptography (PQC). | Improves cryptographic security against quantum computing attacks; Oracle highlights it as a key advance for AI and security. |
| JEP 515 | Primitive Types in Patterns, instanceof, and switch (Third Preview) | Preview | Third preview of primitive types in pattern matching, instanceof, and switch. | Extends pattern matching for more concise code, e.g., direct pattern handling of int. |
| JEP 516 | JFR Cooperative Sampling | Standard | Cooperative sampling mode for JFR that reduces sampling overhead. | Improves the performance of runtime diagnostics tools, suitable for production monitoring. |
| JEP 517 | JFR Method Timing and Tracing | Standard | JFR support for method timing and tracing, enhancing method-level profiling. | Provides finer-grained performance insight to help optimize hot code paths. |
| JEP 518 | Shenandoah Garbage Collector | Standard | Brings the Shenandoah GC into the platform, supporting low-latency collection. | Suited to real-time and high-throughput applications by reducing GC pause times. |
Other Notable Changes and Improvements
- Performance:
String::hashCodebenefits from constant folding, giving notable speedups when string keys are used in statically immutable maps. Overall runtime is faster, including better memory management and GC efficiency. - Removed support: The 32-bit x86 port is no longer maintained, focusing development on 64-bit architectures; legacy 32-bit systems need to move to 64-bit.
- AI and security focus: Oracle highlights 5 AI-related features (such as JFR enhancements and PQC support) to help build efficient AI applications.
- Tooling: IDEs like IntelliJ IDEA have quickly integrated the new features, including inspections, quick fixes, and debugging support.