Oracle’s Outlook on OpenJDK Enhancements in 2024
Oracle’s plans to evolve Java in 2024 involve OpenJDK projects ranging from Amber, for developing smaller, productivity-oriented features, to Babylon, for extending Java to foreign programming models such as GPUs, to Valhalla, for augmenting the Java object model with value objects to eliminate longstanding performance bottlenecks.
In a video posted on January 18, Oracle Java developer relations representative Nicolai Parlog covered what was on the drawing board for Java this year. “Keep in mind, though, that most of the work in any given year will not be released in the same year and so many of these improvements will only be usable in 2025 or later,” Parlog cautioned.
For Project Babylon, Parlog cited plans for code reflection, expanding the reflection API, and allowing transformation of Java code inside a method. The goal is to allow developers to write Java code that libraries then can interpret as a mathematical function, for example. The Babylon team in the coming weeks plans to publish work on use cases such as auto-differentiating, C# LINQ emulation, and GPU programming.
In Project Leyden, aimed at improving startup times, plans for 2024 involve refining the concept of condensers and working toward the production-readiness of prototype condensers. Project Amber includes current features in preview such as string templates, a simplified main method, and statements before this() and super(). “I expect all three to finalize in 2024,” said Parlog. Under exploration are capabilities such as primitive types in patterns and with expressions.
Project Valhalla’s work will focus on value classes and objects, which provide class instances that have only final instance fields and lack object identity. Removing identity would not only eliminate developer confusion about the meaning of == applied to those classes, but also significantly reduce the run time overhead of boxed Integer, Double, and Byte objects.
Project Lilliput aims at downsizing Java object headers in the HotSpot JVM and reducing Java’s memory footprint. Work now centers on polishing a fast-locking scheme.
Project Panama, for interconnecting JVM and native C code, “has three irons in the fire,” Parlog said. The vector API is in incubation, the foreign function and memory API is being improved, and jextract, a tool that generates Java bindings from native library headers, is under construction, all of which make working with native libraries simpler.
Regarding Project Loom, which incubates Java VM and API features, Parlog noted that virtual threads are final and the structured concurrency and scoped values APIs reached their second previews in Java 22. Finalization is expected this year, with hopes for progress on making synchronization non-pinning and file I/O non-capturing, especially on Linux.