Java SE 19 release

After six months of development, Oracle has released Java SE 19 (Java Platform, Standard Edition 19), which uses the OpenJDK open source project as a reference implementation. With the exception of the removal of some deprecated features, Java SE 19 maintains backward compatibility with previous releases of the Java platformβ€”most previously written Java projects will still work without modification when running under the new version. Installable builds of Java SE 19 (JDK, JRE, and Server JRE) are prepared for Linux (x86_64, AArch64), Windows (x86_64), and macOS (x86_64, AArch64). Developed by the OpenJDK project, the Java 19 reference implementation is fully open under the GPLv2 license with GNU ClassPath exceptions to allow dynamic linking to commercial products.

Java SE 19 is categorized as a regular support release, with updates to be released before the next release. The long term support (LTS) branch should be Java SE 17, which will receive updates until 2029. Recall that starting with the release of Java 10, 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 one constantly updated master branch, which incorporates already completed changes and from which branches are branched every six months to stabilize new releases.

New features in Java 19 include:

  • Preliminary support for record patterns has been proposed, extending the Java 16 pattern matching capability to parse the values ​​of classes of type record. For example: record Point(int x, int y) {} void printSum(Object o) { if (o instanceof Point(int x, int y)) { System.out.println(x+y); } }
  • Linux builds provide support for the RISC-V architecture.
  • Added preliminary support for the FFM (Foreign Function & Memory) API, which allows you to organize the interaction of Java programs with external code and data through calling functions from external libraries and accessing memory outside the JVM.
  • Added support for virtual threads, which are lightweight threads that greatly simplify writing and maintaining high-performance multi-threaded applications.
  • The fourth preliminary implementation of the Vector API is proposed, which provides functions for vector calculations that are performed using the vector instructions of the x86_64 and AArch64 processors and allow you to simultaneously apply operations to several values ​​at once (SIMD). Unlike the capabilities provided in the HotSpot JIT compiler for autovectorization of scalar operations, the new API makes it possible to explicitly control vectorization for parallel data processing.
  • A third experimental implementation of pattern matching in switch expressions has been added, which allows using flexible templates in case labels that cover a series of values ​​at once, for which cumbersome chains of if...else statements had previously been used. Object o = 123L; String formatted = switch (o) { case Integer i -> String.format("int %d", i); case Long l -> String.format("long %d", l); case Double d -> String.format("double %f", d); case String s -> String.format("String %s", s); default -> o.toString(); };
  • An experimental Structured Parallelism API has been added that makes it easier to develop multi-threaded applications by treating multiple tasks running on different threads as a single unit.

Source: opennet.ru

Add a comment