New Features in JDK 18: Overview of JEPs and Release Details
JDK 18, released on March 22 2022, introduces nine new JEPs—including default UTF‑8 charset, a simple web server, code snippet support in JavaDoc, vector API, external function and memory API, and switch pattern matching—while being a short‑term feature release following the LTS JDK 17.
Java Development Kit (JDK) 18 was released on March 22, 2022. The new standard Java version includes nine new features, which were frozen on December 9 and entered the first Ramp‑down phase.
Note that JDK 17 is a long‑term support (LTS) version with at least eight years of Oracle support, while JDK 18 is a short‑term feature release supported for only six months. Early access builds for Linux, Windows, and macOS are available at jdk.java.net/18/ .
JEP 400: UTF‑8 as the Default Charset – Makes UTF‑8 the default character set for all Java API implementations, ensuring consistent behavior across platforms, locales, and configurations.
JEP 408: Simple Web Server – Provides a command‑line tool that starts a minimal static‑file web server without CGI or servlet capabilities, useful for prototyping, temporary coding, and teaching environments.
JEP 413: Code Snippets in JavaDoc – Introduces an @snippet tag for the Standard Doclet, simplifying the inclusion of example source code in API documentation.
JEP 416: Core Reflection Reimplemented with Method Handles – Refactors java.lang.reflect to use method handles, reducing API maintenance and development costs for methods, constructors, and fields.
JEP 417: Vector API (Third Incubator) – Adds an API for expressing vector computations that can be compiled to optimal CPU vector instructions at runtime, delivering performance superior to equivalent scalar code.
JEP 418: Internet Address Resolution SPI – Defines a service‑provider interface for hostname and address resolution, allowing java.net.InetAddress to use custom resolvers beyond the platform’s built‑in one.
JEP 419: Foreign Function & Memory API (Second Incubator) – Introduces a new API enabling Java programs to interoperate with native code and memory safely, offering a more robust alternative to JNI.
JEP 420: Switch Pattern Matching – Enhances the switch expression and statement with pattern matching, allowing concise and safe handling of complex data‑centric queries.
JEP 421: Deprecate Finalization – Deprecates the legacy finalization mechanism due to its unpredictability and performance issues, encouraging migration to try‑with‑resources or cleaners.
The second Ramp‑down phase began on January 20, 2022, with the initial and final release candidates scheduled for February 10 and February 24, 2023, respectively. The stable JDK 18 release arrived on March 22, 2022; details can be found on the JDK announcement page at openjdk.java.net/projects/jdk/18/ .
Java Architect Essentials
Committed to sharing quality articles and tutorials to help Java programmers progress from junior to mid-level to senior architect. We curate high-quality learning resources, interview questions, videos, and projects from across the internet to help you systematically improve your Java architecture skills. Follow and reply '1024' to get Java programming resources. Learn together, grow together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.