
Java 28 starts to take shape
A sixth feature, ahead-of-time (AOT) code compilation, has been proposed for JDK 28. Java Development Kit 28 is a non-LTS (Long-Term Support) or “feature release” of standard Java due in March 2027. Ahead-of-time code c…
以下正文同步自 InfoWorld,版权归原站所有,已转换为易读排版。
A sixth feature, ahead-of-time (AOT) code compilation, has been proposed for JDK 28. Java Development Kit 28 is a non-LTS (Long-Term Support) or “feature release” of standard Java due in March 2027.
Ahead-of-time code compilation would improve Java application startup and warmup time by making optimized native code for the application instantly available when the Java Virtual Machine starts, according to the proposal. Goals of the proposal include enabling applications to achieve peak performance more quickly and enabling applications to sustain peak performance even as workloads change, without requiring any changes to the code of applications, libraries, or frameworks.
The five features previously targeted to JDK 28 include the following:
- Introduce value objects, which are immutable and lack object identity. Value objects are distinguished by the values of their fields, and can be represented by the JVM in ways that improve performance. A goal of the feature is to give developers a programming model for immutable data in which the == operator, and all other operations, distinguish objects by the values of their fields rather than their identities. Value objects is a preview feature.
- Switch the default mode of the Shenandoah Garbage Collector (GC) to the generational mode and deprecate the non-generational mode, with the intent to remove it in a future release. Goals include signaling the intent that future development will focus on generational mode, and reducing the maintenance cost of supporting two different modes. However, it is not a goal to remove non-generational mode at this time.
- Introduce strictly-initialized fields in the JVM. Such fields must be initialized before they are read, thus default values such as 0 or null are never observed. For strictly-initialized fields that are final, the same value is always observed. A goal is offering designers of JVM-based programming languages a model for field initialization, which has stronger integrity guarantees than the present model. This is a preview feature.
- Introduce a simple JSON API for parsing and generating JSON documents so that doing so does not require an external library. The intent is to enable many JSON processing tasks to be accomplished with little coding. A standard means would be provided in the Java platform to process JSON Data Interchange Format with minimal ceremony. This is an incubator feature.
- Deprecate the macOS/x64 port for removal in order to reduce maintenance costs. Because Apple has transitioned its hardware products to the AArch64 processor architecture and is phasing out support for x64, Oracle engineers will stop maintaining the macOS/x64 port as of JDK 27. The intent is to remove the port in a future JDK release.
- Introduce PEM encodings of cryptographic objects. This is an API for encoding objects that represent cryptographic keys, certificates, and certificate revocation lists into the widely-used Privacy-Enhanced Mail transport format, and for decoding from PEM format back into objects.
The predecessor to JDK 28, JDK 27, arrived September 15. Both JDK 27 and JDK 28 are non-LTS releases that will be backed by six months of support by Oracle.
正文由 FLUX 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。