Paul Krill
Editor at Large

Oracle’s plans for Java in 2024

news
Jan 23, 20243 mins
JavaProgramming LanguagesSoftware Development

The Java steward expects the OpenJDK to tackle improvements ranging from a simplified main to GPU programming, condensers, and value objects, although all may not arrive this year.

shutterstock 560673883 coffee poured into white coffee cup coffee beans java
Credit: jazz3311 / Shutterstock

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 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 coming weeks plans to publish work on use cases such as auto-differentiating, C# LINQ emulation, and GPU programming.

[ Related: Oracle CloudWorld 2024 coverage ]

In Project Leyden, which is aimed at improving startup times, plans for 2024 involve refining the concept of condensers and working toward the production-readiness of prototype condensers. In Project Amber, current features in preview include 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.

In Project Valhalla, work will focus on value classes and objects, which provide class instances that have only final instance fields and lack object identity. The classes Integer, Double, and Byte, which represent boxed primitives, are examples of classes that wrap or “box” simple values that do not need 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.

In Project Lilliput, aimed 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.

As for Project Loom, which incubates Java VM and API features, Parlog said he thinks its days in the spotlight were coming to an end. Virtual threads are final and the structured concurrency and scoped values APIs reached their second previews in Java 22. Finalization is expected this year. Parlog expressed hope for progress on making synchronization non-pinning and file I/O non-capturing at least on Linux.