What’s New in JDK 24? 24 Features Shaping the Future of Java

JDK 24, slated for a March 2025 release, introduces over twenty‑four enhancements—including a fourth preview of structured concurrency, quantum‑resistant cryptography, and a compact object header—while being a non‑LTS release that builds on the capabilities of JDK 23 and sets the stage for JDK 25.

21CTO
21CTO
21CTO
What’s New in JDK 24? 24 Features Shaping the Future of Java

Overview

JDK 24 is currently in the early reduction phase, with its feature set frozen at twenty‑four items ranging from class‑file API enhancements to the fourth preview of structured concurrency.

Release Timeline

The project entered reduction preparation on 5 December and is scheduled for a production release on 18 March 2025. It offers more than twenty new features, surpassing JDK 23, which introduced twelve new features on 17 September 2023.

New Feature Highlights

Warning for sun.misc.Unsafe memory‑access methods.

Fourth preview of structured concurrency.

Deprecation and removal of the 32‑bit x86 Windows port.

Quantum‑resistant digital‑signature algorithm and key‑encapsulation mechanism.

Additional Proposed Features (previously listed)

These include flexible constructor bodies, ahead‑of‑time class loading, removal of the Windows 32‑bit x86 port, synchronized virtual threads without pinning, simple source files and instance main methods, permanent disabling of the security manager, module‑import declarations, compact object headers, pattern‑matching enhancements for primitive types, jlink support without JMOD files, generational Shenandoah GC, scoped values, a key‑derivation‑function (KDF) API, removal of the non‑generational ZGC mode, stream‑collector extensions, the Vector API, finalization of the class‑file API, G1 post‑barrier extensions, and stricter warnings for JNI usage.

Key Detailed Features

Removal of Windows 32‑bit x86 port: The port is deprecated and will be removed, with build‑system updates that emit error messages when attempts are made to configure a 32‑bit Windows build.

Synchronized virtual threads without pinning: Improves scalability of Java code that uses synchronized methods by allowing virtual threads blocked in such constructs to release their underlying platform thread.

Simple source file and instance main method: Enables beginners to write a first program without needing full language features, continuing the preview from JDK 21‑23.

Permanent disabling of the security manager: Removes the ability for developers to enable the security manager, reflecting its deprecation since Java 17.

Compact object headers: Reduces HotSpot object‑header size from 96/128 bits to 64 bits on 64‑bit architectures, decreasing heap size and improving data locality.

Module‑import declarations: Simplifies importing all packages exported by a module without requiring the code itself to be a module.

Pattern‑matching for primitive types: Extends pattern matching, instanceof, and switch to support all primitive types, unifying data exploration.

jlink without JMOD: Enables creation of custom runtime images that omit JDK JMOD files, reducing JDK size by roughly 25 %—crucial for container images.

Generational Shenandoah GC: Introduces an experimental generational mode to improve throughput, peak‑load resistance, and memory utilization.

Scoped values: Allows immutable data sharing across callers and child threads with lower space and time costs, especially when used with virtual threads and structured concurrency.

KDF API: Provides a key‑derivation‑function API supporting algorithms such as HMAC‑based extraction/expansion (RFC 5869) and Argon2 (RFC 9106).

Removal of non‑generational ZGC mode: Eliminates the legacy mode to reduce maintenance cost; the generational mode will become the default.

Stream collector enhancements: Adds support for custom intermediate operations, making stream pipelines more expressive.

Vector API: Offers a platform‑agnostic API for expressing vector computations that compile to optimal CPU instructions on x64 and AArch64, aligning with Project Valhalla.

Class‑file API finalization: Provides a standard API for parsing, generating, and transforming Java class files, facilitating migration away from internal ASM copies.

G1 post‑barrier extensions: Simplifies implementation of G1 barriers, reducing C2 compilation time and preserving JIT code quality.

JNI usage warnings: Introduces warnings for JNI usage and aligns external function and memory (FFM) API warnings, preparing for future restrictions.

Future Outlook

JDK 24 is a non‑LTS release; the current LTS version is JDK 21, which receives at least five years of premier support. Early‑access builds are available at jdk.java.net/24. The next LTS, JDK 25, is planned for September 2025, and additional features such as ahead‑of‑time class loading and potential re‑introduction of string templates are under consideration.

For more details, see the official OpenJDK project page: https://openjdk.org/projects/jdk/24/

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

JavaBackend Developmentstructured-concurrencyNew FeaturesJDK 24Quantum‑Resistant Cryptography
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.