OpenJDK’s Project Valhalla is approaching a significant delivery point after more than a decade of development, with JEP 401, Value Classes and Objects, targeted for JDK 28. Oracle engineer Lois Foltan confirmed the planned integration on June 15, according to JVM Weekly. The change is expected to arrive as a preview feature, disabled by default, and represents only the first portion of the broader Valhalla program.

The scale of the integration reflects how deeply the work reaches into Java’s runtime. JVM Weekly reports that the pull request adds more than 197,000 lines across 1,816 files and that other large commits were temporarily discouraged while it landed. Preview status means developers will be able to experiment, but the feature is not yet a final, permanently supported part of the language and virtual machine.

Valhalla’s long-standing objective is often summarized as allowing a type to be written like a class while operating more like an `int`. Java developers currently choose between eight built-in primitive types and reference types for most structured data. An ordinary object generally carries an identity and metadata, occupies heap space and is reached through a reference. Large collections of small objects can therefore add allocation, garbage-collection and pointer-indirection costs.

Dense representation matters because modern processors benefit when related values sit together in memory. Data packed into nearby locations can make better use of cache lines, while scattered objects require additional memory lookups. Just-in-time compilers can sometimes eliminate allocations through escape analysis, but that optimization depends on whether the compiler can prove an object remains local. Storing it in a field or array, or passing it through code the compiler cannot fully analyse, can prevent the optimization.

Programmers in performance-sensitive fields often avoid those costs by representing structured information as bare primitive values. That can save memory but lose the encapsulation, naming, validation and methods that classes provide. Value classes aim to narrow this trade-off by retaining a class-based programming model while giving the JVM more freedom to use compact layouts where identity is unnecessary.

The effort began formally in 2014 and has passed through several prototypes as its designers confronted compatibility and runtime questions. Its JDK 28 appearance will not mean every planned Valhalla capability has shipped. Brian Goetz, a leading Java language architect, emphasized that JEP 401 is a first part, according to the report.

For Java users, the immediate milestone is therefore an opportunity to test semantics, tooling and performance rather than a signal to rewrite production systems. A preview in the main JDK can expose the design to much broader feedback. After years of research, Valhalla’s challenge shifts from proving the concept to showing how safely it can fit Java’s existing ecosystem.