7

Java 22 begins to take shape

 11 months ago
source link: https://www.infoworld.com/article/3708329/java-22-begins-to-take-shape.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Java 22 begins to take shape

The foreign function and memory API, for interoperability with native code, would be finalized in the JDK 22 release due in March 2024.

By Paul Krill

Editor at Large,

InfoWorld | Oct 6, 2023 2:00 am PDT

pottery skill talent tools binary fluid maleable create clay by marina skoropadskaya

Marina_Skoropadskaya / Getty Images

Java Development Kit 22, due to arrive in March 2024 as the next planned version of Java Standard Edition, is off and running. The first feature, a foreign function and memory API, has been officially proposed to target the release.

The foreign function and memory API allows Java programs to interoperate with code and data outside of the Java runtime. By invoking foreign functions and safely accessing foreign memory, Java programs can call native libraries and process native data without the brittleness of JNI (Java Native Interface), the proposal states.

[ Also on InfoWorld: 7 reasons Java is still great ]

The foreign function and memory API previously was previewed in JDK 19, JDK 20, and JDK 21. It would be finalized in JDK 22. The latest revisions cover three areas: supporting arbitrary charsets for native strings, enabling clients to build C-language function descriptors programmatically, and introducing the Enable-Native-Access JAR-file manifest attribute. The latter allows executable JAR files to call restricted methods without having to use the --enable-native-access command-line option.

Due March 19, 2024, Java 22 is a Feature release that will receive six months of support from Oracle, unlike just-released JDK 21, which is a Long Term Support (LTS) release that will receive at least eight years of support. Companies besides Oracle could offer longer support for JDK 22 if they so choose. Standard Java updates occur every six months, and LTS releases arrive every two years.

Other capabilities likely to appear in JDK 22 include features also previously previewed, such as string templates and unnamed classes and instance main methods. Other capabilities that could make their first appearance in JDK 22 include a class-file API, for parsing, transforming, and generating Java files, and computed constants, which are immutable value holders that are initialized at most once.

Prior to general availability, JDK 22 is set to go through rampdown phases next January and February, followed by two release candidates in February 2024.

Paul Krill is an editor at large at InfoWorld, whose coverage focuses on application development.

Follow

Copyright © 2023 IDG Communications, Inc.

Sponsored Links


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK