Java 18 Brings New Features to Accelerate Software Development
With Java 18, Oracle is introducing a series of incremental features, many of which focus on easing application development.
Oracle madeJava 18 generally available on March 22, providing users of the widely deployed programming language with new capabilities to improve software development practices.
Java 18 follows the Java 17 release, which Oracle released in September 2021 as Long Term Support (LTS) update, with support for eight years. Java 18 is not an LTS; it's an incremental update with support for only six months. What it includes are updates for code libraries and tools as well as previews for technologies that are currently in development and not yet production-ready.
"We take a lot of pride in continuing to steward the ecosystem forward," Chad Arimura, vice president of Java Developer Relations at Oracle, told ITPro Today. "Java has over 10 million developers, and no matter how you look at it, Java really is one of the most successful technology platforms in history."
Java 18 Features Include New Integrated Simple Web Server
Among the new features in Java 18 is one defined by Java Enhancement Proposal (JEP) 408 for a Simple Web Server.
Prior to Java 18, if developers wanted to test code in a web server, they would have required separate web server technology, such as Apache or Nginx, to run application code. The Simple Web Server is not intended to replace a full web server for complex application code or production deployment, but rather is intended to help developers try out code quickly, according to Arimura.
"It is really a learning tool to make it so that a developer can download the JDK [Java Development Kit] to kick off a web server that is responding to requests," he said. "We look at this as a continued investment into making Java more approachable for new developers, and also making it more approachable for teachers and educators as well."
Java 18 Improves Documentation to Help New Developers
The Simple Web Server isn't the only Java 18 feature designed to help new developers. JEP 413 is a new capability that enables code snippets to appear in Java API documentation. The goal of JEP 413 is to enable Java application documentation to be more expressive by adding code snippets that get syntax highlighting, Arimura said.
"It also introduces an API to access those code snippets so you can actually test your code in line inside the documentation," he said. "This is not just for the developers of the JDK, but also for any developer who's adding Java docs to their own code."
Also of note in Java 18 is support for UTF-8 by default. UTF-8 is a Unicode Standard for defining character sets used across IT systems.
"With this change, APIs that depend upon the default charset will behave consistently across all implementations, operating systems, locales, and configurations," JEP 400 states.
About the Author
You May Also Like