Java Development Kit (JDK) 18 is now available as an official production version, along with Java 18. The new version of Java JDK 18 standard has been announced by the Open JDK group and Oracle has released the new version under a commercial license for those who use the Oracle JDK release as part of an Oracle product or service, or for those who want the benefit of commercial support.
Improvements in the new release include a simple web server for prototyping and testing, and the ability to add code snippets in the Java API documentation.
The Simple Web Server is very simple; you get a command line tool that starts a minimal web server that only serves static HTTP files. No CGI or servlet-like functionality is available. The JDK team says the tool will be useful for prototyping, ad-hoc coding, and testing purposes.
The new version also includes the ability to add code snippets in the Java API documentation. The reason for this addition is to help validate source code fragments by providing API access to these fragments. The OpenJDK group says that:
“While accuracy is ultimately the responsibility of the author, increased support in
javadoc and related tools can make it easier to do. »
UTF-8 becomes the default character set for standard Java APIs in this release. This means that APIs that depend on the default character set will behave consistently across all implementations, operating systems, locales, and configurations, and help make Java programs more predictable and portable when their code relies on the default character set.
There are also several incubator APIs included in this release, starting with an updated version of the Incubator Vector API that can be used to work with CPU architectures that provide scalable vector extensions.
The foreign function and memory incubation API has also been updated. This allows Java programs to interact with code and data outside of the Java runtime environment. The API handles the calling of foreign functions and memory so that Java programs can call native libraries and process native data”without the fragility and trappings of NYI“.
A third incubator is pattern matching for switch. This provides a way to use pattern matching for expressions and switch statements, as well as pattern language extensions.
JDK 18 and Java 18 are available now.
JDK 18 on OpenJDK
Java 16 Hits General Availability
Microsoft is jumping on the OpenJDK bandwagon
Foojay – All about Java and the OpenJDK
Where is Java going in 2020
The true state of Java and its ecosystem
Java 15 reaches general availability
Java at 25
To be notified of new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
or send your comment to: firstname.lastname@example.org