Java 19 continues the evolution of the open source programming language
Oracle has officially announced the general availability of Java 19 on September 20, marking the second release of the widely used open-source programming language in 2022.
Java 19 follows Java 18 six months and continues to deliver new features that aim to make the programming language easier for developers to use, while providing more functionality.
Java 19 is an incremental release and will only be supported for six months. As part of its rapid release cycle, Java features are bundled into larger projects that define a target capability that will be enabled through the introduction of individual Java features detailed by the JDK Enhancement Process (JEP).
The JEPs included in Java 19 help move three key projects forward, explained Georges Saab, senior vice president of development, Java Platform at Oracle and chairman of the board of OpenJDK. ITPro today.
“One is Project Loon, which is about scalability; the second is Project Amber, which is about the evolution of the Java language itself and its syntax; and the last is Project Panama, which is about interoperability with other languages,” said Saab.
Bringing New Patterns to Java 19 Development
Within the Project Amber group, Java 19 boasts a pair of enhancements that are now in preview.
The first is a Ability to save patterns. The characteristic is defined in JEP 405, which extends pattern matching to express more sophisticated and composable data queries. JEP 427 provides pattern matching for Switch, which improves Java pattern matching for switch expressions and statements.
As part of the Panama project, Java has been extended in recent years to better support functions that are normally outside of Java. For instance, Java 15, which was released in September 2020, introduced JEP 383 as a new API for foreign memory access. In Java 19 there is another foreign memory extension with JEP 424.
“Project Panama is a global project to improve connections between Java and non-Java APIs,” Saab said. “While we believe there will always be incremental improvements that can be made to help developers using non-Java APIs, we will continue to innovate in these areas.”
Specific to what’s new in Java 19 with JEP 424, a key change in this release is more control over foreign memory allocation and deallocation through the “MemorySession” API, he said. Also, there are improvements around the foreign function API.
Another new feature of Java 19 for Project Panama is JEP 426 which helps improve performance with an API to express vector calculations.
Java performance will likely also benefit from the Loon project’s efforts for virtual threads that made their way into Java 19.
“Virtual threads are lightweight threads that dramatically reduce the effort of writing, maintaining, and watching high-throughput concurrent applications.” JEP 425 states.
Java 19 will be the final release of Java in 2022. The next incremental release, Java 20, is currently scheduled for release in March 2023. Java 21, scheduled for release in September 2023, will be a Long Term Support (LTS) update ) which will be supported for five years. The current version of Java LTS is Java 17, which became generally available in September 2021 and will be supported until at least 2026.
About the AuthorSean Michael Kerner is an IT consultant, tech enthusiast, and handyman. He consults for industry and media organizations on technology issues.