Bbabo NET

Science & Technology News

Java SE 19 released

Oracle presented the Java SE 19 platform (Java Platform, Standard Edition 19). The open source project OpenJDK was used as a reference implementation.

Java SE 19 maintains backward compatibility with previous releases of the Java platform. Most of the previously written Java projects will work without changes when launched under the new version.

Java SE 19 builds (JDK, JRE and Server JRE) are ready for installation on Linux (x86_64, AArch64), Windows (x86_64) and macOS (x86_64, AArch64).

The Java 19 implementation is fully open source under the GPLv2 license with GNU ClassPath exceptions to allow dynamic linking to commercial products.

Java SE 19 will have a regular support lifespan, which will be updated before the next release. Java SE 17 will have a long term support (LTS). Updates for the version will be released until 2029.

Java 19 included:

preliminary support for record patterns (record pattern), which extends the ability of Java 16 to match with a means to parse the values ​​of classes of type record;

record Point(int x, int y) {} void printSum(Object o) { if (o instanceof Point(int x, int y)) { System.out.println(x+y); } }support for RISC-V architecture in Linux builds;

preliminary support for the FFM (Foreign Function & Memory) API for organizing the interaction of Java programs with external code and data through calling functions from external libraries and accessing memory outside the JVM;

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, which provides functions for vector calculations using the vector instructions of the x86_64 and AArch64 processors. The new API allows explicit control of vectorization for parallel data processing;

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();}; third experimental implementation of pattern matching in "switch" expressions, allowing flexible patterns with a series of values ​​in "case" labels.

Java SE 19 released