GraalVM Enhances JDK 22 Support with Full Compatibility for Just-in-Time and Native Image Compilation
Oracle has announced the release of GraalVM for JDK 22, marking a significant update for Java developers. This new version, which coincides with the release of Java 22 on March 19, extends GraalVM’s capabilities with support for the latest Java features and improvements in both just-in-time (JIT) and ahead-of-time (AOT) compilation.
Features Supported in GraalVM for JDK 22
GraalVM for JDK 22 supports a wide array of features from Java 22, enhancing both runtime performance and development efficiency. Notable features that are supported include string templates, the class-file API, unnamed variables and patterns, structured concurrency, and scoped values. This broad support ensures that developers can leverage the new capabilities of Java 22 while benefiting from GraalVM’s performance optimizations.
Performance Benefits of GraalVM
One of the standout advantages of using GraalVM is its performance benefits. GraalVM binaries are known for their reduced size, faster startup times, and superior performance with minimal warmup. The Native Image feature of GraalVM allows for ahead-of-time compilation, converting Java applications into standalone binaries that use less memory and CPU compared to traditional JVM applications. This is particularly useful for applications requiring fast startup times and efficient resource usage.
Enhancements in GraalVM’s Structure
The release also brings changes to GraalVM’s internal structure. The Graal module has been renamed from jdk.internal.vm.compiler
to jdk.graal.compiler
, and the compiler packages have been moved to the new jdk.graal.compiler
namespace. This renaming aligns with the preparations for Project Galahad and helps establish a dedicated namespace for Graal subprojects.
Project Galahad and OpenJDK Integration
Project Galahad is an initiative aimed at contributing GraalVM-related technologies to the OpenJDK community. This project is focused on preparing these technologies for potential inclusion in a future JDK mainline release. By aligning with Project Galahad, GraalVM aims to integrate its innovations more closely with the broader Java ecosystem, fostering collaborative development and ensuring that GraalVM’s advancements can benefit the wider Java community.
Broader Language Support
Beyond Java, GraalVM continues to support a variety of programming languages, including Python, JavaScript, and Ruby. This multi-language support makes GraalVM a versatile tool for polyglot environments, allowing developers to work with different languages within the same runtime.
Conclusion
GraalVM for JDK 22 represents a significant step forward in enhancing the Java runtime with advanced compilation techniques and broader feature support. By improving performance and expanding capabilities through Project Galahad, GraalVM is poised to offer developers powerful tools for modern Java applications and beyond.