Languages and runtimes
Project Valhalla value classes (JEP 401) reach preview, targeting JDK 28
- Category: Languages
- Status: developing
- Sources: JEP 401, The Register, HN discussion
- Summary: JEP 401, Value Classes and Objects, the central language feature of the long-running Project Valhalla, is set to land as a preview in JDK 28. The Register reported on 2026-06-15 that Oracle engineer Lois Foltan confirmed the change will merge into the OpenJDK mainline early in July 2026; the first-preview pull request adds more than 197,000 lines across 1,816 files. Value classes create objects with no identity, distinguished only by their field values rather than their location in memory, which lets the JVM flatten and inline them for performance instead of forcing heap allocation and pointer indirection. The feature ships as an opt-in preview, not enabled by default, and JEP 401 migrates some existing JDK classes such as
Integerto value classes, with more to follow over later releases. JDK 28 is expected in March 2027. - Comments: Brian Goetz cautioned against expecting a short preview window, saying hoping for the feature to exit preview by JDK 29 (the next LTS, expected September 2027) "seems optimistic," so production-ready value classes remain at least a year out.
- Why it matters: Value classes are the largest Java language change in a decade and the foundation for flattened generics and value-based numerics, so teams tracking JVM memory layout, allocation pressure, and data-oriented APIs should begin reading JEP 401 now even though general availability is years away.
- Follow-up: Confirm the mainline merge in early July 2026 and watch whether JEP 401 stays preview through JDK 29.