Java 25 Release Notes
Oracle has released Java 25, the latest version of the world's most popular programming language. This release introduces multiple enhancements to improve developer productivity, performance, stability, security, and AI capabilities. Oracle will provide long-term support (LTS) for Java 25 for at least eight years, allowing organizations to migrate at their own pace.
Overview
Java 25 offers hundreds of improvements across language, libraries, performance, and security. Key highlights include:
- Enhanced productivity and simpler code for beginners.
- Better performance and memory efficiency for large-scale and AI applications.
- Improved security features, including post-quantum cryptography support.
- Structured concurrency and virtual threads for easier multithreaded programming.
- Long-term support until at least 2033 for updates beyond September 2028.
Language Enhancements (JDK 25)
JEP | Feature | Description |
---|---|---|
JEP 507 | Primitive Types in Patterns, instanceof, and switch (Third Preview) | Allows primitive types in pattern matching, instanceof, and switch to increase uniformity and ease AI application development. |
JEP 511 | Module Import Declarations | Simplifies importing all packages from a module without requiring the importing code to be modular. |
JEP 512 | Compact Source Files and Instance Main Methods | Reduces boilerplate for beginners and IT administrators, making small programs easier to write. |
JEP 513 | Flexible Constructor Bodies | Enables input validation and field initialization before calling the superclass constructor, improving code safety. |
Library Enhancements
JEP | Feature | Description |
---|---|---|
JEP 505 | Structured Concurrency (Fifth Preview) | Simplifies multithreaded programming by treating groups of related tasks as a single unit. |
JEP 506 | Scoped Values | Allows sharing immutable data across threads efficiently, beneficial for AI, web frameworks, and microservices. |
JEP 502 | Stable Values (Preview) | Introduces objects holding immutable data with performance optimizations similar to final fields. |
JEP 508 | Vector API (10th Incubator) | Enables high-performance vector computations for AI and compute-intensive tasks. |
Security Enhancements
JEP | Feature | Description |
---|---|---|
JEP 470 | PEM Encodings of Cryptographic Objects (Preview) | Provides APIs for encoding/decoding keys, certificates, and revocation lists in PEM format. |
JEP 510 | Key Derivation Function API | Supports cryptographic key derivation and hybrid encryption, preparing for quantum-safe security. |
Performance Improvements
JEP | Feature | Description |
---|---|---|
JEP 519 | Compact Object Headers | Reduces object header size on 64-bit systems, improving memory efficiency. |
JEP 514 | Ahead-of-Time Command-Line Ergonomics | Makes creating AOT caches easier, accelerating application startup. |
JEP 515 | Ahead-of-Time Method Profiling | Speeds up startup performance by using pre-collected method execution profiles. |
Monitoring Enhancements
JEP | Feature | Description |
---|---|---|
JEP 509 | JFR CPU-Time Profiling (Experimental) | Provides more accurate CPU-time measurements for performance analysis. |
JEP 518 | JFR Cooperative Sampling | Improves reliability by reducing bias in asynchronous thread sampling. |
JEP 520 | JFR Method Timing & Tracing | Enables developers to find bottlenecks and optimize code via JFR bytecode instrumentation. |
Cloud and Java SE Subscription
Java 25 provides improved performance and efficiency when deployed on Oracle Cloud Infrastructure (OCI). Developers benefit from Oracle Java SE Universal Subscription, including:
- Enterprise Performance Pack
- Comprehensive Java support and triage
- Java Management Service
- Flexible upgrade and maintenance options
This ensures optimal performance, security, and cost-efficiency for cloud and on-premises Java applications.
Community Feedback
Java 25 is well-received by the global Java community. Key comments include:
- Features like compact source files, instance main methods, and module import declarations simplify Java for beginners and expand usage for experienced developers.
- Six-month release cadence allows small, incremental innovations, keeping Java modern and competitive.
- Community-driven development ensures Java continues to evolve with strong support for AI, performance, and security features.