Java 26 Released: Project Detroit Aims for Faster JavaScript & Python Interop
Oracle has released Java 26, a short-term release, alongside the introduction of Project Detroit, an initiative aimed at streamlining interoperability between Java, JavaScript, and Python. This move addresses a long-standing necessitate for Java developers to more easily integrate code written in these other popular languages, particularly as the utilize of Python grows within data science and, increasingly, artificial intelligence workflows.
Java 26 will be supported for six months, until the arrival of Java 27 later this year. Looking further ahead, the next long-term support (LTS) release, Java 29, is slated for September 2027. While these regular updates are standard for the Java platform, Project Detroit represents a more fundamental shift in how Java interacts with other ecosystems.
Bridging the Gap with the Foreign Function and Memory API
The foundation for Project Detroit lies in the Foreign Function and Memory (FFM) API, introduced in Java 22. Previously, Java developers relied on the Java Native Interface (JNI) for interoperability, a process often described as complex and cumbersome. FFM offers a more integrated and user-friendly approach. “The FFM API allows for very thin layers that will enable you to go and call JavaScript, or from JavaScript call back to Java,” explained Bernard Traversat, VP of software development at Oracle, in a recent briefing. This simplification is key to unlocking more seamless integration.
Project Detroit is planned to be proposed as an OpenJDK project and will be formally presented at JavaOne, currently underway in Redwood City, California. The initial focus will be on JavaScript and Python, with plans to expand support to other languages in the future.
Beyond WebAssembly: Embedding Runtimes for Performance and Security
Existing solutions for language interoperability, such as GraalWasm, utilize WebAssembly as an intermediary. Project Detroit takes a different tack. According to Traversat, the core innovation is “embedding the V8 and CPython runtime directly inside the JVM process.” This approach contrasts with previous attempts, like Project Nashorn, which aimed to implement JavaScript directly on the Java Virtual Machine (JVM). The challenge with Nashorn, he explained, was constantly trying to keep pace with the rapidly evolving JavaScript ecosystem, which largely centers around V8 (used by Chrome and Node.js).
This direct embedding isn’t just about convenience; it’s also about performance and security. Traversat highlighted that JavaScript and Python, unlike Java, often have less rigid specifications, leading to “a lot of corner cases that are challenging to support.” By leveraging established runtimes like V8 and CPython, Project Detroit aims to sidestep these complexities. Oracle believes this approach will deliver improved security through isolation: “One can clearly isolate the Java heap versus what is running on the V8 heap or the CPython heap.”
Helidon and the Java Verified Portfolio
Alongside Project Detroit, Oracle announced several other developments. Project Helidon, an open-source framework for building microservices, will be contributed to the OpenJDK, aligning its release cycle with the JDK. This means developers will have immediate access to new JDK features and consistent long-term support. You can identify more information about Project Helidon on its official website.
The company also introduced the Java Verified Portfolio (JVP), a curated collection of services, libraries, frameworks, and tools that are officially supported and validated for enterprise use. Currently, the JVP includes Project Helidon, JavaFX, and the Java platform extension for Visual Studio Code. Notably, commercial support for JavaFX, a framework for rich media and graphical applications, has been reinstated due to growing demand in areas like AI and data analytics visualizations.
Enhancements for Java Learning and AI Integration
Oracle is also focusing on improving the Java learning experience. Support for Java in VS Code Jupyter notebooks has been added, and the Java Playground online learning platform now allows for sharing code snippets with students. This reflects a broader trend of making Java more accessible to new developers.
The influence of artificial intelligence is also apparent. Oracle referenced several projects aimed at integrating Java with AI technologies, including Helidon AI, Langchain4j (for connecting Java with large language models), Spring AI, and the Embabel framework (for building AI agents). Still, the company is still formulating a policy regarding the use of AI-generated code contributions, acknowledging the need to “leverage AI” while also addressing potential concerns.
Java 26: Incremental Improvements and a Farewell to Applets
Java 26 itself includes a number of incremental improvements and previews of upcoming features, such as primitive types in patterns and switch statements, the Vector API, and structured concurrency. HTTP/3 support has been added to the HTTP client API.
One notable change is the removal of the Java applet API. As stated in Java Enhancement Proposal 504, applets are now obsolete due to lack of support in modern web browsers and JDK releases. Interestingly, the creation of JavaScript was, in part, motivated by the desire to script Java applets. While applets have faded into history, Project Detroit demonstrates the enduring need for interoperability between Java and JavaScript.
The evolution of Java continues, adapting to the changing landscape of software development and the growing influence of technologies like Python and artificial intelligence. Project Detroit represents a significant step towards a more connected and versatile Java ecosystem. The next steps involve formalizing the project within the OpenJDK and refining the integration of V8 and CPython runtimes, with a focus on performance, security, and ease of use.
Further details on the Java 26 release can be found in the official release notes.