Oracle Announces Java 18 – Database Trends and Applications

Oracle has announced the availability of Java 18, the latest version of the programming language and development platform.

The latest Java Development Kit (JDK) provides updates and improvements with nine JDK Enhancement Proposals (JEPs). These include the ability to add Code Snippets in Java API Documentation (JEP 413), which simplifies the addition of sample source code in API documentation, and Simple Web Server (JEP 408) for prototyping and testing. Developers can explore two incubating modules: the Vector API (JEP 417) and the Foreign Function and Memory API (JEP 419), as well as a preview feature: Pattern Matching for Switch (JEP 420).

“The release of Java 18 demonstrates Oracle’s continued commitment to provide enterprises and developers faster access to enhancements with the 6-month feature release cadence,” said Georges Saab, vice president of development, Java Platform Group, Oracle. “We continue to make technical investments that improve the performance, stability, and security of the Java SE Platform implementations, as well as the Java Development Kit.”

According to Oracle, Java 18 is the latest release under Java’s 6-month release cadence and is the result of extensive collaboration between Oracle engineers and other members of the worldwide Java developer community via the OpenJDK Project and the Java Community Process (JCP). This provides innovations while also delivering continued performance, stability, and security improvements.

The largest changes delivered in Java 18 are:

Updates and Improvements to Libraries

  • JEP 400:UTF-8 by Default—Sets UTF-8 as the default charset of the standard Java APIs.
  • JEP 408:Simple Web Server—A command-line tool and API to start a minimal web server that serves static files only.
  • JEP 416:Reimplement Core Reflection with Method Handles—Reimplements java.lang.reflect.Method, Constructor, and Field on top of java.lang.invoke method handles.
  • JEP 418:Internet-Address Resolution SPI—Defines a service-provider interface (SPI) for host name and address resolution, so that net.InetAddress can make use of resolvers other than the platform’s built-in resolver.

Tools

  • JEP 413:JEP Code Snippets in Java API Documentation—Introduces the @snippet tag for JavaDoc’s Standard Doclet to simplify the inclusion of example source code in API documentation.

Preview and Incubators for Later JDK Releases

  • JEP 417: Vector API (Third Incubator)—Provides an API for developers to reliably leverage CPU architectures that provide scalable vector extensions.
  • JEP 419:Foreign Function and Memory API (Second Incubator)Enables Java programs to interoperate with code and data outside of the Java runtime.
  • JEP 420: Pattern Matching for Switch (Second Preview)—Enhances the Java programming language with pattern matching for switch expressions and statements, along with extensions to the language of patterns.

Future Proofing Java Programs

  • JEP 421:Deprecate Finalization for Removal—Finalization remains enabled by default for now, but can be disabled to facilitate testing. In a future release, it will be disabled by default, and in a later release, it will be removed.

For more information, go to www.oracle.com.

Leave a Comment