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:
-
Value Objects, introducing objects that lack identity and thus can have optimized encodings
-
Null-Restricted Storage of value objects to improve memory layouts
-
Array Enhancements to support properties like immutability and safe initialization, and to facilitate interop between primitive and reference arrays
-
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
-
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.
-
Dan Smith: Better Tools for Immutable Data (JavaOne 2026)
-
Frederic Parain: Value Classes & Heap Flattening (JVM Language Summit 2025)
-
Brian Goetz: Growing the Java Language (JVM Language Summit 2025)
-
Dan Smith: A New Model for Java Object Initialization (JavaOne 2025)
-
Brian Goetz: Valhalla—Where Are We? (JVM Language Summit 2024)
-
Dan Smith: Value Objects in Valhalla (JVM Language Summit 2023)
- The State of Valhalla (December 2021)
- Parametric JVM
- Background: How We Got the Generics We Have (June 2020)
- The Saga of the Parametric VM (April 2021)
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
-
Mailing lists
-
valhalla-dev, for technical discussion and user experiences related to Project Valhalla (archives)
-
valhalla-spec-experts, for moderated design discussion among invited experts (archives)
-
valhalla-spec-observers, for those who wish to monitor discussions in the valhalla-spec-experts list; public replies are allowed, but not forwarded to the experts list (archives)
-
valhalla-spec-comments, for sending specification-related comments, suggestions, and other feedback to the expert group (archives)
-
-
Documentation repository (allows updating this page!)
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 |
Legacy Links
See the legacy page for links to earlier proposed JEPs, design documents, presentations, and prototypes.