Oracle made Java 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.
Download Java 18
Mobile App Development Best Practices – 04.10
iOS New and Deprecated APIs in iOS 17 Abstract Class vs. Protocol-Oriented Approach in Swift Comparing the Performance of the...
New and Deprecated APIs in iOS 17
In this video, I would like to share with you some things that were either deprecated or added in iOS...
Promova helps people with dyslexia learn languages
The new Promova feature comes just in time for National Dyslexia Awareness Month and is available on the platform for...
Notify – A simple note application with modern MVVM, Compose and Material3
Notify is a simple note application that is built with Modern Android development tools. This project showcases the Good implementation...
Mobile App Development Best Practices – 03.10
iOS MetaCodable – Supercharge Swift’s Codable implementations with macros meta-programming How to build a Tuist plugin and publish it using...
How to make and use BOM (Bill of Materials) dependencies in Android projects
By using a BOM dependency, you can avoid specifying the versions of each individual library in your app, and let...