Java Development Kit (JDK) 24 is set to introduce a range of new capabilities and improvements to the Java language and platform. Following the recent release of JDK 23 in September, work is underway to refine and prepare 17 features for JDK 24, slated for release on March 18, 2025. This non-LTS release, like JDK 23, will receive six months of primary support from Oracle. Developers can access early builds at jdk.java.net.
Key Updates in JDK 24
Among the newly proposed features are updates to virtual threads, adjustments to security mechanisms, and refinements to Java’s garbage collection, particularly with generational Shenandoah and the Z Garbage Collector (ZGC). Some highlights include:
Removing the Windows 32-bit x86 Port JDK 24 aims to remove the 32-bit x86 support for Windows, aligning with the previous deprecation announced in JDK 21. An error message will alert developers if an attempt is made to configure a 32-bit x86 build, but this can be bypassed via a new configuration option. This step will simplify Java’s codebase by discontinuing specific features tied to 32-bit x86 compatibility.
Virtual Threads without Pinning Virtual threads will be enhanced to release underlying platform resources more effectively, promoting scalability by removing restrictions that previously bound virtual threads to physical threads. This change is expected to boost Java’s performance in handling workloads with numerous concurrent threads.
Simplified Source Files and Instance Main Methods JDK 24 continues to support simplified syntax for beginners, allowing new Java developers to build programs without needing complex language constructs. This is the fourth preview of simplified source files, previously trialed in JDK 21 through JDK 23.
Permanent Disabling of the Security Manager The Security Manager, deprecated in Java 17, will be completely disabled in JDK 24. This change reflects the manager’s limited use for securing server and client applications, as it has become costly to maintain and largely replaced by alternative security practices.
Primitive Types in Patterns, instanceof, and switch This feature enhances pattern matching and allows primitive types in constructs like instanceof and switch. By incorporating primitives directly into pattern contexts, Java developers gain better type matching and data handling consistency across primitive and reference types.
Further Innovations
JDK 24 also brings refinements to Java’s memory management and performance optimization:
Generational Shenandoah and ZGC Enhancements JDK 24 experiments with generational garbage collection for Shenandoah, offering improved memory efficiency and responsiveness. ZGC will phase out its non-generational mode, focusing solely on generational capabilities, which are anticipated to yield better performance in most cases.
Stream Gatherers and Vector API Enhancements Stream gatherers allow Java’s Stream API to handle more complex data transformation operations, supporting larger and even infinite data streams. The Vector API, reintroduced in JDK 24, enables optimized vector operations compatible with most CPU architectures, enhancing computational efficiency, particularly on x64 and AArch64 platforms.
Class-File API and Linking without JMODs The finalized class-file API provides a streamlined method for processing Java class files, while the removal of JMOD requirements from linked runtime images aims to reduce JDK size by about 25%, beneficial for cloud deployments where resource optimization is critical.
Key Derivation Function (KDF) API Introducing the KDF API allows developers to leverage cryptographic techniques to generate keys securely from an initial secret, supporting algorithms like HMAC and Argon2.
Projected Features for Java’s Future
With JDK 24 serving as an intermediary release ahead of the anticipated JDK 25 LTS release in 2025, future Java enhancements may include finalized support for features like structured concurrency, which simplifies handling of asynchronous tasks, and string templates for cleaner syntax.
In summary, JDK 24’s new features and optimizations underscore Java’s ongoing evolution, addressing developer feedback on performance, scalability, and simplicity. Although non-LTS releases typically see lower adoption, JDK 24’s innovations make it a valuable stepping-stone for those eager to leverage the latest Java improvements ahead of JDK 25.
Java Development Kit 24: New and Upcoming Features
Java Development Kit (JDK) 24 is set to introduce a range of new capabilities and improvements to the Java language and platform. Following the recent release of JDK 23 in September, work is underway to refine and prepare 17 features for JDK 24, slated for release on March 18, 2025. This non-LTS release, like JDK 23, will receive six months of primary support from Oracle. Developers can access early builds at jdk.java.net.
Key Updates in JDK 24
Among the newly proposed features are updates to virtual threads, adjustments to security mechanisms, and refinements to Java’s garbage collection, particularly with generational Shenandoah and the Z Garbage Collector (ZGC). Some highlights include:
JDK 24 aims to remove the 32-bit x86 support for Windows, aligning with the previous deprecation announced in JDK 21. An error message will alert developers if an attempt is made to configure a 32-bit x86 build, but this can be bypassed via a new configuration option. This step will simplify Java’s codebase by discontinuing specific features tied to 32-bit x86 compatibility.
Virtual threads will be enhanced to release underlying platform resources more effectively, promoting scalability by removing restrictions that previously bound virtual threads to physical threads. This change is expected to boost Java’s performance in handling workloads with numerous concurrent threads.
JDK 24 continues to support simplified syntax for beginners, allowing new Java developers to build programs without needing complex language constructs. This is the fourth preview of simplified source files, previously trialed in JDK 21 through JDK 23.
The Security Manager, deprecated in Java 17, will be completely disabled in JDK 24. This change reflects the manager’s limited use for securing server and client applications, as it has become costly to maintain and largely replaced by alternative security practices.
instanceof
, andswitch
This feature enhances pattern matching and allows primitive types in constructs like
instanceof
andswitch
. By incorporating primitives directly into pattern contexts, Java developers gain better type matching and data handling consistency across primitive and reference types.Further Innovations
JDK 24 also brings refinements to Java’s memory management and performance optimization:
JDK 24 experiments with generational garbage collection for Shenandoah, offering improved memory efficiency and responsiveness. ZGC will phase out its non-generational mode, focusing solely on generational capabilities, which are anticipated to yield better performance in most cases.
Stream gatherers allow Java’s Stream API to handle more complex data transformation operations, supporting larger and even infinite data streams. The Vector API, reintroduced in JDK 24, enables optimized vector operations compatible with most CPU architectures, enhancing computational efficiency, particularly on x64 and AArch64 platforms.
The finalized class-file API provides a streamlined method for processing Java class files, while the removal of JMOD requirements from linked runtime images aims to reduce JDK size by about 25%, beneficial for cloud deployments where resource optimization is critical.
Introducing the KDF API allows developers to leverage cryptographic techniques to generate keys securely from an initial secret, supporting algorithms like HMAC and Argon2.
Projected Features for Java’s Future
With JDK 24 serving as an intermediary release ahead of the anticipated JDK 25 LTS release in 2025, future Java enhancements may include finalized support for features like structured concurrency, which simplifies handling of asynchronous tasks, and string templates for cleaner syntax.
In summary, JDK 24’s new features and optimizations underscore Java’s ongoing evolution, addressing developer feedback on performance, scalability, and simplicity. Although non-LTS releases typically see lower adoption, JDK 24’s innovations make it a valuable stepping-stone for those eager to leverage the latest Java improvements ahead of JDK 25.
Archives
Categories
Archives
Rust 1.84 Unveils Enhanced Strict Provenance APIs
January 16, 2025Google Introduces Jules: A New Contender in the AI Coding Assistant Space
December 29, 2024Categories
Meta