News

Oracle confirms the availability of Java 19

Oracle has announced that Java 19 is now available, the latest version of the Java programming language and development platform, of which a new version is released every six months. The arrival of this version also entails the launch of its JDK 19 development kit, which answers seven JDK enhancement proposals. Java 19 has several improvements in performance, stability, and security.

JDK 19 incorporates language enhancements within the OpenJDK Amber project, such as registration patterns and pattern matching for expressions and switch statements. Also improvements in interoperability with non-Java code and to take advantage of vector instructions (Vector API) in the framework of the OpenJDK Panama project.

It also features the first visuals of the Loom project, with virtual threads and structured concurrency. The former will make it easier to write and maintain high-performance concurrent applications in Java. The second optimizes error handling and cancellation, improves reliability and observability by simplifying multi-threaded programming and treating multiple tasks running in different threads as a single unit of work.

Language updates and improvements

The first is the JEP 405: Registration Patterns (preview). With it, users will be able to nest record and type patterns. In this way they will be able to use a powerful, declarative and modular navigation and data processing system. This expands the possibilities of pattern matching, to allow more sophistication and modularity in data queries.

Refering to JEP 427: Pattern matching for switch expressions and statements (third preview); allows pattern matching for expressions and switch statements. This is because Java 19 makes it easier for these expressions and statements to be tested against various patterns.

Library tools and ports

The JEP 424: Memory API and External Functions (preview), allows Java programs to more easily interoperate with external code and data outside of the Java runtime. By efficiently calling external functions and safely accessing external memory, the API enables Java programs to call native libraries and process native data with a Java-only development model. This leads to more ease of use and improvements in performance, flexibility and security.

On the other hand, the JEP 426: API Vector (fourth incubation) enables performance greater than that of equivalent scalar computations by expressing vector computations that reliably compile vector instructions at runtime on supported CPU architectures.

As for the ports, the JEP 422: Linux/RISC-V Port stipulating that the port be integrated into the main JDK repository makes it easier to implement Linux/RISC-V more easily.

In addition to these improvements, Java 19 is now compatible with Java Management Servicea native Oracle Cloud Infrastructure (OCI) service that provides a single pane of glass to help businesses manage Java applications and runtimes in both the cloud and on-premises environments.

Related Articles

Leave a Reply

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