The next version of standard Java, packed with two dozen features, has entered the release candidate stage. The production release is due in March.
Java Development Kit (JDK) 24 has entered the release candidate stage. The next version of standard Java will ship with 24 features, ranging from a class-file API to a fourth preview of structured concurrency.
The first JDK 24 release candidate arrived February 6, following two rampdown stages. JDK 24 is due as a production release on March 18, after a second release candidate due February 20. With its two dozen features, JDK 24 far outdoes predecessor JDK 23, which arrived September 17 with 12 features.
The five most recent additions to JDK 24 include warnings upon the use of memory access methods in sun.misc.unsafe
, a fourth preview of structured concurrency, deprecating the 32-bit x86 port for removal, and improving Java’s resistance to quantum computing attacks by providing Java implementations of a quantum-resistant module-latticed-based digital signature algorithm and a quantum-resistant module-latticed-based key encapsulation mechanism.
Previously proposed features include flexible constructor bodies; ahead-of-time class loading and linking; removing the Windows 32-bit x86 port; synchronizing virtual threads without pinning; simple source files and instance main methods; permanently disabling the security manager; module import declarations; an experimental version of compact object headers; primitive types in patterns, instanceof
, and switch
; linking runtime images without JMODs; the generational Shenandoah garbage collector; scoped values; a key derivation function API; removal of the non-generational mode in the Z Garbage Collector; stream gatherers; a vector API; a class-file API; warnings to prepare developers for future restrictions on the use of JNI (Java Native Interface); and a late barrier expansion for the G1 garbage collector.
JDK 24 has been designated a non-long-term support (LTS) release. (The current LTS release is JDK 21, which shipped in September 2023.) Like JDK 23, JDK 24 will receive only six months of premier-level support from Oracle. Early access builds of JDK 24 can be found at jdk.java.net. JDK 24 is slated to be followed next September by the next LTS release, JDK 25.
With a warning upon use of memory-access methods in sun.misc.Unsafe
, Java would issue a warning at runtime on the first occasion that any memory-access method in sun.misc.unsafe
is invoked. All of these unsupported methods were terminally deprecated in JDK 23 and have been superseded by standard APIs. The sun.misc.Unsafe
class was created to provide a mechanism for Java classes to perform low-level operations. Most of its methods are for accessing memory, either in the JVM’s garbage-collected heap or in off-heap memory, which is not controlled by the JVM. As the class name suggests, these memory-access methods are unsafe.
Explore IT Tech News for the latest advancements in Information Technology & insightful updates from industry experts!
Source : https://www.infoworld.com/article/3491404/jdk-24-the-new-features-in-java-24.html