Oracle Technology announced that JDK 19 is now complete, as it has reached the initial release phase. Seven features for this release, including structured concurrency, record models, a preview of a foreign function and memory API, and Instruction Set Architecture (ISA) support Linux/RISC-V. Java 19 will be available in September 2022.
In keeping with the JDK 19 release schedule, Mark Reinhold, Chief Architect of Oracle’s Java Platform Group, announced that additions to the next version of the SDK are complete. As a reminder, a new standard version of Java is published every six months. With this final step in the process of releasing the standard version of Java, other planned features, such as universal generics and value objects, will have to wait for a later version of the platform. New features in JDK 19 include:
New Java SE APIs, javax.net.ssl.getSignatureSchemes() and javax.net.ssl.setSignatureSchemes(), have been added to allow applications to customize the signature schemes used in individual TLS or DTLS connections. The underlying provider can define default signing schemes for each TLS or DTLS connection.
Applications can also use existing system properties jdk.tls.client.SignatureSchemes and or jdk.tls.server.SignatureSchemes to customize vendor-specific default signature schemes. If they are not null, the signature schemes passed to the method setSignatureSchemes() will override the default signing schemes for the specified TLS or DTLS connections.
A provider may not have been updated to support the new APIs and in this case may ignore the signature schemes defined. The SunJSSE JDK provider supports this method. It is recommended that third-party vendors add support for these methods when adding support for JDK 19 or later.
New system properties for System.out and System.err
Two new system properties, stdout.encoding and stderr.encoding, have been added. The value of these system properties is the encoding used by the standard output and standard error streams (System.out and System.err). The default values for these system properties are platform-dependent. The values take the value of the native.encoding property when the platform does not provide streams for the console. Properties can be overridden by the launcher’s command line option (with -D) to set them to UTF-8 when needed.
Unicode 14.0 support
This release updates support for Unicode 14.0, which includes the following: of 144,697 characters. These additions include 5 new scripts, for a total of 159 scripts, as well as 37 new emoji characters. The java.text.Bidi and java.text.Normalizer classes support level 14.0 of the Unicode Standard Appendices, #9 and #15 respectively. The java.util.regex package supports stretched graph clusters based on level 14.0 of the Unicode Standard Appendix #29. For more details on Unicode 14.0, see the Unicode Consortium release note.
HTTPS channel binding support for Java GSS/Kerberos
Support for TLS channel binding tokens for Negotiate/Kerberos authentication over HTTPS has been added via javax.net.HttpsURLConnection. Channel binding tokens are increasingly needed as a form of strong security. They work by communicating from a client to a server the client’s understanding of the binding between connection security, represented by a TLS server certificate, and higher-level authentication information, such as a username. user and a password. The server can then detect if the client has been tricked by an MITM and abort the session or connection. This functionality is controlled by a new system property jdk.https.negotiate.cbt which is described in detail in Networking Properties.
Additional date and time formats
Additional date/time formats are now introduced in classes java.time.format.DateTimeFormatter/DateTimeFormatterBuilder. In previous versions, only 4 predefined styles, namely FormatStyle.FULL/LONG/MEDIUM/SHORTwere available.
Now users can specify their own flexible style with the new method DateTimeFormatter.ofLocalizedPattern(String requestedTemplate). For instance, DateTimeFormatter.ofLocalizedPattern(“yMMM”).
produces a formatter capable of formatting a date in a localized way, such as “Feb 2022” in the US locale, while “2022年2月” in the Japanese locale. The method DateTimeFormatterBuilder.appendLocalized(String requestedTemplate) is also provided.
Support for PAC-RET protection on Linux/AArch64
Support for PAC-RET protection on the Linux/AArch64 platform has been introduced. When enabled, OpenJDK will use the hardware features of the ARMv8.3 Pointer Authentication Code (PAC) extension to protect against Return Oriented Programming (ROP) attacks. For more information on the PAC extension, see “Providing protection for complex software” or the Pointer authentication in AArch64 state section in the ARM Arm.
To take advantage of this feature, OpenJDK must first be built with the –enable-branch-protection configure option using GCC 9.1.0+ or LLVM 10+ . Next, the -XX:UseBranchProtection=standard runtime flag will enable PAC-RET protection if the system supports it and the java binary was compiled with branch protection enabled; otherwise the flag is silently ignored. Alternatively, -XX:UseBranchProtection=pac-ret will also enable PAC-RET protection, but in this case, if the system does not support it or the java binary was not compiled with branch protection enabled, a warning will be printed.
Linux/RISC-V instruction set architecture support
RISC-V is a free and open source RISC instruction set architecture (ISA), originally designed at the University of California, Berkeley, and now co-developed under the sponsorship of RISC-V International. It is already supported by a wide range of language tool chains. According to the JDK team, with the increasing availability of RISC-V hardware, a port of the JDK would be valuable. With the Linux/RISC-V port, Java would gain support for a hardware instruction set that is already supported by a wide range of language tool chains.
RISC-V is actually a family of related ISAs. The Linux/RISC-V port would only support the RV64GV configuration of RISC-V, a general-purpose 64-bit ISA that includes vector instructions. Java developers may consider other RISC-V configurations in the future.
Automatic generation of the CDS archive
The JVM -XX:+AutoCreateSharedArchive option can be used to automatically create or update a CDS archive for an application. For example: java -XX:+AutoCreateSharedArchive -XX:SharedArchiveFile=app.jsa -cp app.jar App The specified archive will be written if it does not exist, or if it was generated by a different version of the JDK. In an interview with The Register, Georges Saab, Oracle’s SVP of Java Platform Development and Chairman of the OpenJDK Board of Directors, said that this was the tenth release made as part of of the six-month publication cycle.
All of these versions were released on the scheduled date and time, Saab said. There have been no delays since we switched to this model, which as you probably know wasn’t always the case with the previous model we had. Saab said the result is being able to get innovation into the hands of developers faster than was possible during multi-year release cycles.
In the past, they often had to wait quite a long time to get something new in Java, and then they got too much, all at once, he explained. We realize that not everyone wants to rebase everything every six months,” Saab added. That’s why we offered a Java SE subscription for long-term support, to allow companies that want to stay on a single version and receive updates every quarter, to ensure their security.
Java’s accelerated release cycle doesn’t necessarily mean that new features appear suddenly. They often surface as preview technologies, to elicit community feedback and adjustments in subsequent releases. We haven’t found a magic way to do three or four years of work in six months,” Saab explained. Thus, the development process of Java has become iterative and participatory, even if it allows community members to wait for the release of versions for features to mature.
The enhancements that the Java community is focusing on have been organized around specific themes. For example, explains Saab, the Amber project aims to improve the Java language and syntax, in order to make them more modern, more succinct, easier to use and, above all, easier to read and understand. Leyden aims to improve start-up time and warm-up time. Loom is all about scalability and takes Java scalability to the next level.
In Java 19, these thematic projects are expressed in various Java Improvement Proposals, or JEPs.
What is your opinion on the subject?
See as well :
JDK 18, the reference implementation of Java 18, is now available, it offers like Python, Ruby, PHP or even Erlang, a ready-to-use mini Web server
JDK 19: New features in Java 19 include structured concurrency, record models, and a preview of a foreign function and memory API