JDK 18 favicon
All About JDK 18
JDK 18 • 2022 • Java 18
UTF-8 default charsetjwebserversnippet JavadocFinalization deprecatedPattern Matching switch (2nd)FFM API (2nd incubator)

JDK 18 and the shift from JDK 17

UTF-8 as default charset (JEP 400). Simple Web Server (jwebserver). Code Snippets in Javadoc (@snippet). Pattern Matching switch (2nd preview). Vector API (3rd incubator). Foreign Function & Memory API (2nd incubator). Finalization deprecated.

Why JDK 18 mattered

The release in context

UTF-8 as default charset (JEP 400). Simple Web Server (jwebserver). Code Snippets in Javadoc (@snippet). Pattern Matching switch (2nd preview). Vector API (3rd incubator). Foreign Function & Memory API (2nd incubator). Finalization deprecated.

UTF-8 default charsetjwebserversnippet JavadocFinalization deprecatedPattern Matching switch (2nd)FFM API (2nd incubator)
  • UTF-8 as default charset (JEP 400). Simple Web Server (jwebserver). Code Snippets in Javadoc (@snippet). Pattern Matching switch (2nd preview). Vector API (3rd incubator). Foreign Function & Memory API (2nd incubator). Finalization deprecated.
  • Key release highlights included UTF-8 default charset, jwebserver, snippet Javadoc, Finalization deprecated.
  • Compared with JDK 17, the most visible shifts included @snippet Javadoc, UTF-8 default charset, Internet-Address Resolution SPI.
  • UTF-8 as default charset fixes a 26-year platform-dependent encoding problem. Simple web server for testing.
  • The release reinforced the new normal: steady delivery, smaller changes, and incremental platform modernization.
Platform stack

JDK 18 architecture preview

This larger diagram expands the smaller JDK badge into a layered platform view showing how the development kit, runtime, virtual machine, APIs, tools, and supporting subsystems fit together for this release.

Previous-version diff

What changed from JDK 17 to JDK 18

The release reinforced the new normal: steady delivery, smaller changes, and incremental platform modernization.

Java Language Features

  • @snippet Javadoc appeared in JDK 18, adding a new capability in java language features.
  • UTF-8 default charset appeared in JDK 18, adding a new capability in java language features.
  • Pattern Matching switch (2nd preview) was updated in JDK 18, showing active movement in java language features.
  • Sealed Classes appeared in JDK 18, adding a new capability in java language features.

New Features / Modern APIs

  • Foreign Function & Memory API (2nd incubator) was updated in JDK 18, showing active movement in new features / modern apis.
  • Pattern Matching switch (2nd preview) was updated in JDK 18, showing active movement in new features / modern apis.
  • Vector API (3rd incubator) was updated in JDK 18, showing active movement in new features / modern apis.
  • Sealed Classes appeared in JDK 18, adding a new capability in new features / modern apis.

Other Base Libraries

  • Internet-Address Resolution SPI appeared in JDK 18, adding a new capability in other base libraries.
  • Finalization (deprecated) started being phased out in JDK 18, signaling a shift away from older platform assumptions.
  • Enhanced PRNG (RandomGenerator) carried forward from JDK 17 and settled into the baseline by JDK 18.
  • Strong JDK Encapsulation (final) carried forward from JDK 17 and settled into the baseline by JDK 18.
Matrix slice

Quick comparison table: JDK 17 vs JDK 18

This side-by-side view turns the source evolution matrix into a faster way to see which language, tooling, runtime, and platform layers moved between these two releases.

Area Component JDK 17 JDK 18 Why it stands out
Java Language Features @snippet Javadoc Not present NEW @snippet Javadoc appeared in JDK 18, adding a new capability in java language features.
Java Language Features UTF-8 default charset Not present NEW UTF-8 default charset appeared in JDK 18, adding a new capability in java language features.
Other Base Libraries Internet-Address Resolution SPI Not present NEW Internet-Address Resolution SPI appeared in JDK 18, adding a new capability in other base libraries.
Tools & Tool APIs jwebserver (Simple Web Server) Not present NEW jwebserver (Simple Web Server) appeared in JDK 18, adding a new capability in tools & tool apis.
Deployment Applet API Not present Deprecated Applet API started being phased out in JDK 18, signaling a shift away from older platform assumptions.
Other Base Libraries Finalization (deprecated) Not present Deprecated Finalization (deprecated) started being phased out in JDK 18, signaling a shift away from older platform assumptions.
JVM: Native Method Interface Foreign Function & Memory (incubator) Not present UPD Foreign Function & Memory (incubator) was updated in JDK 18, showing active movement in jvm: native method interface.
New Features / Modern APIs Foreign Function & Memory API (2nd incubator) Not present UPD Foreign Function & Memory API (2nd incubator) was updated in JDK 18, showing active movement in new features / modern apis.
New Features / Modern APIs Pattern Matching switch (2nd preview) Not present UPD Pattern Matching switch (2nd preview) was updated in JDK 18, showing active movement in new features / modern apis.
JVM: Execution Engine & GC JIT (C1+C2+Graal preview) UPD Present JIT (C1+C2+Graal preview) moved from active change in JDK 17 into a more stable baseline by JDK 18.
Tools & Tool APIs jpackage (final) UPD Present jpackage (final) moved from active change in JDK 17 into a more stable baseline by JDK 18.
Deployment Applet API (deprecated for removal) Deprecated Not present Applet API (deprecated for removal) no longer carried the same role in JDK 18, marking a meaningful platform cleanup.
Structured comparison

Grouped reading of the release shift

UTF-8 as default charset fixes a 26-year platform-dependent encoding problem. Simple web server for testing.

Java Language Features
New in JDK 18
  • @snippet Javadoc
  • UTF-8 default charset
  • Sealed Classes
  • Pattern Matching switch (preview)
  • Restore Always-Strict Floating-Point
Updated by JDK 18
  • Pattern Matching switch (2nd preview)
  • Sealed Classes (final)
New Features / Modern APIs
New in JDK 18
  • Sealed Classes
  • Pattern Matching switch (preview)
  • RandomGenerator API
Updated by JDK 18
  • Foreign Function & Memory API (2nd incubator)
  • Pattern Matching switch (2nd preview)
  • Vector API (3rd incubator)
  • Sealed Classes (final)
Other Base Libraries
New in JDK 18
  • Internet-Address Resolution SPI
  • Enhanced PRNG (RandomGenerator)
  • Strong JDK Encapsulation (final)
Updated by JDK 18
  • Finalization (deprecated)
Historical platform profile

Release narrative

UTF-8 as default charset (JEP 400). Simple Web Server (jwebserver). Code Snippets in Javadoc (@snippet). Pattern Matching switch (2nd preview). Vector API (3rd incubator). Foreign Function & Memory API (2nd incubator). Finalization deprecated.

UTF-8 as default charset fixes a 26-year platform-dependent encoding problem. Simple web server for testing.

UTF-8 default charsetjwebserversnippet JavadocFinalization deprecatedPattern Matching switch (2nd)FFM API (2nd incubator)
Why it mattered later

Why JDK 18 matters in the JDK timeline

This release fits into the steady JDK cadence where tooling, runtime behavior, and delivery capabilities evolve one step at a time.

  • JDK 18 sits in the timeline as a feature release, which shaped how teams evaluated and adopted it.
  • It is commonly remembered for UTF-8 default charset, jwebserver, snippet Javadoc.
  • Compared with JDK 17, it gives a clearer picture of how the JDK platform was evolving release by release.
  • UTF-8 as default charset fixes a 26-year platform-dependent encoding problem. Simple web server for testing.
Related pages

Continue through the platform story