Significant Changes in JDK 23 Release

See JDK 23 Release Notes for additional descriptions of the new features and enhancements, and API specification in JDK 23.

The following are some of the updates in Java SE 23 and JDK 23:

Language Preview Features

See JEP 12: Preview Features and Preview Language and VM Features in Java Platform, Standard Edition Java Language Updates.

Library Improvements Previews and Incubator

  • The Class-File API is used for parsing, generating, and transforming Java class files.

    See JEP 466: Class-File API (Second Preview) and Class-File API in Java Platform, Standard Edition Java Virtual Machine Guide.

  • Stream gatherers enable you to create custom intermediate operations, which allow stream pipelines to transform data in ways that aren't easily achievable with existing built-in intermediate operations.

    See JEP 473: Stream Gatherers (Second Preview) and Stream Gatherers in Java Platform, Standard Edition Core Libraries.

  • Structured concurrency treats multiple tasks running in different threads as a single unit of work, thereby streamlining error handling and cancellation, improving reliability, and enhancing observability.

    See JEP 480: Structured Concurrency (Third Preview) and Structured Concurrency in Java Platform, Standard Edition Core Libraries.

  • Scoped values enables sharing of immutable data within and across threads. They are preferred to thread-local variables, especially when using large numbers of virtual threads.

    See JEP 481: Scoped Values (Third Preview) and the ScopedValue class in the Java API Specification.

  • The Vector API is introduced to express vector computations that reliably compile at runtime to optimal vector instructions on supported CPU architectures, thus achieving performance superior to equivalent scalar computations. See JEP 469: Vector API (Eighth Incubator).

See JEP 11: Incubator Modules.

Runtime Improvements

  • The ZGC garbage collector now runs in the generational mode by default. The non-generational mode of ZGC has been deprecated for removal. This will generally improve application performance, although a small number of workloads that are non-generational in nature may be impacted negatively.

    See JEP 474: ZGC: Generational Mode by Default and the section The Z Garbage Collector in Java Platform, Standard Edition HotSpot Virtual Machine Garbage Collection Tuning Guide.

  • The Oracle GraalVM JIT compiler (Graal JIT) is now included among the JITs available as part of the Oracle JDK. This integration offers innovations previously made available through Oracle GraalVM, such as novel JIT code optimization techniques (see Compiler Advantages in the GraalVM documentation). This provides developers and system administrators more options to help fine tune and improve peak performance of their applications. The Graal JIT is enabled by passing the command line options to the Java executable:
    -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT

    If you do not pass these flags at JVM startup, the Oracle JDK default JIT (C2) will run as usual.

Tooling

JavaDoc documentation comments can now be written in Markdown syntax along with HTML elements and JavaDoc tags.

See JEP 467: Markdown Documentation Comments and Markdown in Documentation Comments in Java Platform, Standard Edition JavaDoc Guide.

Removed APIs, Tools, and Components

For more details on removals and deprecations, see Features and Options Removed and Deprecated in JDK 23.

In addition, there are security related updates that you need to be aware of. See Security Updates in JDK 23.