JDK 22 favicon
All About JDK 22
JDK 22 • 2024 • Java 22
FFM API (FINAL)Unnamed Vars (final)Stream Gatherers (preview)Class-File API (preview)Statements before super() (preview)Thread.stop() removed

JDK 22 and the shift from JDK 21

Unnamed Variables & Patterns (final, JEP 456). Statements before super() (preview). String Templates (2nd preview). FFM API finalised (JEP 454). Class-File API (preview). Structured Concurrency (2nd preview). Scoped Values (2nd preview). Stream Gatherers (preview). Thread.stop() removed.

Why JDK 22 mattered

The release in context

Unnamed Variables & Patterns (final, JEP 456). Statements before super() (preview). String Templates (2nd preview). FFM API finalised (JEP 454). Class-File API (preview). Structured Concurrency (2nd preview). Scoped Values (2nd preview). Stream Gatherers (preview). Thread.stop() removed.

FFM API (FINAL)Unnamed Vars (final)Stream Gatherers (preview)Class-File API (preview)Statements before super() (preview)Thread.stop() removed
  • Unnamed Variables & Patterns (final, JEP 456). Statements before super() (preview). String Templates (2nd preview). FFM API finalised (JEP 454). Class-File API (preview). Structured Concurrency (2nd preview). Scoped Values (2nd preview). Stream Gatherers (preview). Thread.stop() removed.
  • Key release highlights included FFM API (FINAL), Unnamed Vars (final), Stream Gatherers (preview), Class-File API (preview).
  • Compared with JDK 21, the most visible shifts included Statements before super() (preview), Class-File API (preview), Stream Gatherers (preview).
  • FFM API finalised — safe native interop replaces sun.misc.Unsafe. Thread.stop() removed after 29 years.
  • The platform kept broadening its native interop and ergonomics story without losing its cadence discipline.
Platform stack

JDK 22 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 21 to JDK 22

The platform kept broadening its native interop and ergonomics story without losing its cadence discipline.

New Features / Modern APIs

  • Class-File API (preview) appeared in JDK 22, adding a new capability in new features / modern apis.
  • Stream Gatherers (preview) appeared in JDK 22, adding a new capability in new features / modern apis.
  • FFM API (FINAL) was updated in JDK 22, showing active movement in new features / modern apis.
  • Structured Concurrency (2nd preview) was updated in JDK 22, showing active movement in new features / modern apis.

Java Language Features

  • Statements before super() (preview) appeared in JDK 22, adding a new capability in java language features.
  • String Templates (2nd preview) was updated in JDK 22, showing active movement in java language features.
  • Unnamed Variables & Patterns (final) was updated in JDK 22, showing active movement in java language features.
  • Pattern Matching switch appeared in JDK 22, adding a new capability in java language features.

Other Base Libraries

  • Class-File API (preview) appeared in JDK 22, adding a new capability in other base libraries.
  • Launch Multi-File Source Programs appeared in JDK 22, adding a new capability in other base libraries.
  • Key Encapsulation Mechanism API carried forward from JDK 21 and settled into the baseline by JDK 22.
  • Sequenced Collections carried forward from JDK 21 and settled into the baseline by JDK 22.
Matrix slice

Quick comparison table: JDK 21 vs JDK 22

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 21 JDK 22 Why it stands out
Java Language Features Statements before super() (preview) Not present NEW Statements before super() (preview) appeared in JDK 22, adding a new capability in java language features.
New Features / Modern APIs Class-File API (preview) Not present NEW Class-File API (preview) appeared in JDK 22, adding a new capability in new features / modern apis.
New Features / Modern APIs Stream Gatherers (preview) Not present NEW Stream Gatherers (preview) appeared in JDK 22, adding a new capability in new features / modern apis.
Other Base Libraries Class-File API (preview) Not present NEW Class-File API (preview) appeared in JDK 22, adding a new capability in other base libraries.
Other Base Libraries Launch Multi-File Source Programs Not present NEW Launch Multi-File Source Programs appeared in JDK 22, adding a new capability in other base libraries.
lang and util Base Libraries Stream Gatherers (preview) Not present NEW Stream Gatherers (preview) appeared in JDK 22, adding a new capability in lang and util base libraries.
lang and util Base Libraries Thread.stop() removed Not present Removed Thread.stop() removed no longer carried the same role in JDK 22, marking a meaningful platform cleanup.
Deployment Applet API Deprecated Deprecated Applet API started being phased out in JDK 22, signaling a shift away from older platform assumptions.
Integration Libraries Foreign Function & Memory API (FINAL) Not present UPD Foreign Function & Memory API (FINAL) was updated in JDK 22, showing active movement in integration libraries.
JVM: Native Method Interface Foreign Function & Memory API (FINAL) Not present UPD Foreign Function & Memory API (FINAL) was updated in JDK 22, showing active movement in jvm: native method interface.
Java Language Features String Templates (2nd preview) Not present UPD String Templates (2nd preview) was updated in JDK 22, showing active movement in java language features.
JVM: Runtime Data Areas Virtual Thread Stack Not present Present Virtual Thread Stack appeared in JDK 22, adding a new capability in jvm: runtime data areas.
Integration Libraries Foreign Function & Memory API (3rd preview) UPD Present Foreign Function & Memory API (3rd preview) moved from active change in JDK 21 into a more stable baseline by JDK 22.
JVM: Execution Engine & GC Generational ZGC NEW Present Generational ZGC carried forward from JDK 21 and settled into the baseline by JDK 22.
Structured comparison

Grouped reading of the release shift

FFM API finalised — safe native interop replaces sun.misc.Unsafe. Thread.stop() removed after 29 years.

New Features / Modern APIs
New in JDK 22
  • Class-File API (preview)
  • Stream Gatherers (preview)
  • Virtual Threads
Updated by JDK 22
  • FFM API (FINAL)
  • Structured Concurrency (2nd preview)
  • Pattern Matching switch (FINAL)
  • Record Patterns (FINAL)
  • Scoped Values (preview)
Java Language Features
New in JDK 22
  • Statements before super() (preview)
  • Pattern Matching switch
  • Record Patterns
  • String Templates (preview)
  • Unnamed Classes (preview)
Updated by JDK 22
  • String Templates (2nd preview)
  • Unnamed Variables & Patterns (final)
  • Pattern Matching switch (final)
  • Record Patterns (final)
Other Base Libraries
New in JDK 22
  • Class-File API (preview)
  • Launch Multi-File Source Programs
  • Key Encapsulation Mechanism API
  • Sequenced Collections
Updated by JDK 22
  • Steady platform carry-forward in JDK 22
Historical platform profile

Release narrative

Unnamed Variables & Patterns (final, JEP 456). Statements before super() (preview). String Templates (2nd preview). FFM API finalised (JEP 454). Class-File API (preview). Structured Concurrency (2nd preview). Scoped Values (2nd preview). Stream Gatherers (preview). Thread.stop() removed.

FFM API finalised — safe native interop replaces sun.misc.Unsafe. Thread.stop() removed after 29 years.

FFM API (FINAL)Unnamed Vars (final)Stream Gatherers (preview)Class-File API (preview)Statements before super() (preview)Thread.stop() removed
Why it mattered later

Why JDK 22 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 22 sits in the timeline as a feature release, which shaped how teams evaluated and adopted it.
  • It is commonly remembered for FFM API (FINAL), Unnamed Vars (final), Stream Gatherers (preview).
  • Compared with JDK 21, it gives a clearer picture of how the JDK platform was evolving release by release.
  • FFM API finalised — safe native interop replaces sun.misc.Unsafe. Thread.stop() removed after 29 years.
Related pages

Continue through the platform story