Java SE 21 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.

Oracle unveiled recently the launch of the new version of Java SE 21, which is classified as an extended support version, with updates available until 2031 and which also marks public support for the LTS branch of Java SE 11, but which will have extended support until 2032.

In this new version of Java 21 that is presented, we can find that a generative version of ZGC has been implemented, which introduces separate processing of objects, which increases the efficiency of cleaning recently created objects with a short life.

Another change that stands out in this new version is that logging patterns implementation has been stabilized, expanding the pattern matching feature introduced in Java 16 with tools for parsing values ​​of record type classes, plus support for pattern matching in "switch" expressions has also been stabilized, allowing " case" do not use exact values, but rather flexible patterns that cover a series of values ​​at a time.

In addition to this, we can also find that added preliminary support for Scoped Values, which allows sharing immutable data between threads and exchange data efficiently between child threads. The main difference between scope values ​​and thread-local variables is that the former are written once, cannot be changed in the future, and remain available only for the duration of the thread's execution.

Java SE 21 also highlights the preliminary support for string templates, which allow you to combine text with expressions and calculated variables without using the "+" operator. Substitution of expressions is done using \{..} substitutions and special handlers can be connected to check the correctness of the substituted values.

On the other hand, in Java SE 21 a third draft implementation of the FFM API, which allows you to organize the interaction of Java programs with external code and data by calling functions from external libraries and accessing memory outside the JVM.

Speaking of implementations in Java SE 21, the sixth Vector API preview, which provides functions for vector calculations which are carried out using vector instructions on x86_64 and AArch64 processors and allow operations to be applied simultaneously to multiple values ​​(SIMD). Unlike the capabilities provided in the HotSpot JIT compiler for automatic vectorization of scalar operations, the new API allows explicit control of vectorization for parallel data processing.

Of the other changes that stand out:

  • Added an experimental API for structured concurrency, which simplifies the development of multithreaded applications by treating multiple tasks running on different threads as a single block.
  • The implementation of virtual threads, which are lightweight threads that greatly simplify writing and maintaining high-performance multithreaded applications, has been stabilized.
  • New methods have been added.
  • Added support for ordered collections (SequencedCollection).
  • Added methods to define emoji properties.
  • Added preliminary support for unnamed classes and unnamed instances of the "main" method, where you can dispense with public/static declarations, passing a series of arguments and other entities associated with a class declaration.
  • Added an API to use KEM encryption key encapsulation mechanisms, designed to protect symmetric encryption keys using public key-based algorithms.
  • Added support for the HSS/LMS digital signature algorithm.
    Support for the 32-bit Windows platform has been discontinued.
    In addition, the publication of an update to the platform for creating applications with JavaFX 21 graphical interface can be highlighted.

finally if you are interested in knowing more about it, you can check the details in the following link

Get Java SE 21

For those interested in being able to obtain one of the ready-to-install builds of Java SE 21 that are prepared for Linux, Windows and macOS, you can do so from the project website in its downloads section. The link is this. 


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.