Java SE 20 has already been released and these are its news

Java Platform, Standard Edition

Java SE is a software development kit used to write applets and applications with the Java programming language.

After six months of development, Oracle announced the release of the new version of the platform JavaSE 20 (Java Platform, Standard Edition 20), which uses the OpenJDK open source project as a reference implementation.

In this new released version of Java SE 20, with the exception of removing some deprecated features, Java SE 20 maintains backwards compatibility from the Java platform: Most previously written Java projects will continue to work without change when run with the new version.

Main new features of Java SE 20

JavaSE 20 it is classified as a regular support version, with updates to be released before the next version. The long-term support (LTS) branch should be Java SE 17, which will receive updates until 2029.

Remember that starting with the Java 10 release, the project switched to a new development process, which implies a shorter cycle for the formation of new releases. New functionality is now being developed in a constantly updated master branch, incorporating changes already made and forking every six months to stabilize new versions.

Of the innovations of Java 20 it stands out that it has been proposed preliminary support for Scoped Values, who enables immutable data sharing in threads and efficient data exchange between child threads (values ​​are inherited).

Scoped Values ​​​​​​is being developed to replace the thread-local variables mechanism and they are most efficient when using a large number of virtual threads (thousands and millions of threads). The main difference between Scoped Values ​​and thread-local variables is that Scoped Values ​​are written once, cannot be changed later, and remain available only during thread execution.

Another of the changes that is presented in this new version of Java SE 20 is that a second interim implementation of registration patterns has been added, which extends the pattern matching capability of Java 16 to parse values ​​from classes of type record. For example:

In addition to this, it is also highlighted that added a fourth preliminary implementation of pattern matching in expressions of "switch", which allows "case" tags to use not exact values, but rather flexible templates that cover a number of values ​​at once, which previously required cumbersome string expressions like "if...else" » .

Also, we can find in this new version, which has added a second draft implementation of the FFM API (Foreign Function & Memory) , which allows you to orchestrate the interaction of Java programs with external code and data by calling functions from external libraries and accessing memory outside of the JVM.

On the other hand, it is worth noting that a second preliminary implementation of virtual threads, which are lightweight threads that greatly simplify the writing and maintenance of high-performance multithreaded applications, has been added.

A second variant of the experimental Structured Parallelism API has been added to simplify multi-threaded application development by treating multiple tasks running on different threads as a single unit.

Added a fifth preliminary implementation of Vector API  which provides functions for vector calculations that are executed using the vector instructions of the x86_64 and AArch64 processors and allow you to apply Simultaneous Multi-Value (SIMD) operations.

Unlike the capabilities provided in the HotSpot JIT compiler for automatic vectorization of scalar operations, the new API allows you to explicitly control vectorization for parallel data processing.

Finally, for those interested in this new version, they should know that the installable builds of Java SE 20 (JDK, JRE, and Server JRE) are ready for Linux (x86_64, AArch64), Windows (x86_64), and macOS (x86_64, AArch64).

The reference implementation of Java 20 developed by the OpenJDK project, fully open source under the GPLv2 license with GNU ClassPath exceptions that allow dynamic linking to commercial products.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.