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?
October 2025: Check out the latest early-access build implementing value classes and objects! We encourage Java developers to try it out on their real-world applications and report their experiences.
To get started, you can review this short introduction at inside.java. Learn more with a presentation by Frederic Parain about the JVM optimizations applied to value objects.
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 Classes and Objects, introducing objects that lack identity and thus can have optimized encodings
-
Null Checking at both compile time and run time to manage the flow of null references through programs
-
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.
-
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
Development takes place in a public OpenJDK repository, with occasional early-access builds being published.
Interested developers are encouraged to experiment with these early releases.
Branches in the repository include lworld (the main line of Valhalla development), master (tracking main-line OpenJDK), and various others prototyping proposed features.
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 Classes and Objects (Preview) | Value Classes | Submitted |
| Strict Field Initialization in the JVM | Supplementary | Draft (to be submitted) |
| Null-Restricted and Nullable Types (Preview) | Null Checking | Draft |
| Null-Restricted Value Class Types (Preview) | Null Checking | Draft |
| JEP 402: Enhanced Primitive Boxing (Preview) | Unifying Primitives | Draft |
| Warnings for Value-Based Classes | Value Classes | 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.