Project Valhalla

Project Valhalla is augmenting the Java object model with value objects, combining the abstractions of object-oriented programming with the performance characteristics of simple primitives.

This Project is sponsored by the HotSpot Group.

What’s New?

August 2026:

JEP 401: Value Objects (Preview) and JEP 539: Strict Field Initialization in the JVM (Preview) are now integrated and will be included in JDK 28! Try out value objects today with an early-access JDK 28 build.

For background, you can read the JEP or review this short introduction. For some broader context, see this JavaOne talk about programming with immutable data in Java.

New Features

The anticipated Valhalla language and performance features will not be delivered all at once, but through a steady stream of enhancements across multiple JDK releases.

There are five distinct feature sets under development:

  1. Value Objects, introducing objects that lack identity and thus can have optimized encodings

  2. Null-Restricted Storage of value objects to improve memory layouts

  3. Array Enhancements to support properties like immutability and safe initialization, and to facilitate interop between primitive and reference arrays

  4. Unifying Primitives and Classes by improving the use of boxing for method invocations and generics, and by expanding features like conversions and operators to work with value classes

  5. Parametric JVM, specializing and optimizing generic class and method parameterizations at run time

Background Documents & Presentations

These documents and presentations provide a more holistic view of the Valhalla project’s goals and design considerations.

Implementation

JEP 401: Value Objects (Preview) and JEP 539: Strict Field Initialization in the JVM (Preview) are integrated into the JDK will be included in JDK 28.

Interested developers are encouraged to experiment with early-access builds at https://jdk.java.net/28/.

Other features are prototyped in various branches of the Valhalla GitHub repository.

Community

We welcome input from interested Java developers. Keep in mind that most theoretical ideas have been well explored over the last few years! The greatest help can be provided by those who try out published implementations and can share their experiences with real-world code bases.

Project JEPs

Each enhancement to the Java platform is described and tracked with a JDK Enhancement Proposal (JEP). The following JEPs are under active development or have been delivered.

JEP Feature Status
JEP 401: Value Objects (Preview) Value Objects Integrated
JEP 539: Strict Field Initialization in the JVM (Preview) Supplementary Integrated
Null-Restricted Value Class Types (Preview) Null-Restricted Storage Draft
JEP 402: Enhanced Primitive Boxing (Preview) Unifying Primitives Draft
JEP 390: Warnings for Value-Based Classes Value Objects Delivered in 16
JEP 371: Hidden Classes Supplementary Delivered in 15
JEP 334: JVM Constants API Supplementary Delivered in 12
JEP 309: Dynamic Class-File Constants Supplementary Delivered in 11
JEP 181: Nest-Based Access Control Supplementary Delivered in 11