GraalVM Extends Support for JDK 22 Features with Just-in-Time and Ahead-of-Time Compilation
Oracle has recently unveiled GraalVM for JDK 22, aligning with the latest Java runtime update released on March 19. This new version of GraalVM integrates both just-in-time (JIT) and ahead-of-time (AOT) compilation, providing robust support for Java 22’s enhanced features.
Available for download from the project’s official website, GraalVM for JDK 22 extends compatibility to numerous Java 22 functionalities. These include string templates, the class-file API, unnamed variables and patterns, structured concurrency, and scoped values, all seamlessly supported across Graal’s JIT and Native Image AOT compilation modes.
One of the primary benefits of GraalVM lies in its efficiency gains over traditional JVM-based applications. GraalVM binaries are notably smaller, start faster without requiring warmup periods, and consume less memory and CPU resources. This performance boost is particularly advantageous for modern application deployments where rapid startup times and minimal resource overhead are critical.
GraalVM’s Native Image capability stands out by compiling Java applications into standalone binaries ahead of time. This approach not only simplifies deployment but also enhances security and reduces operational complexity by eliminating the need for a Java runtime environment on the target system.
In tandem with the JDK 22 release, GraalVM has undergone structural changes, including the renaming of the Graal module from jdk.internal.vm.compiler
to jdk.graal.compiler
. This adjustment is part of preparations for Project Galahad, aimed at contributing GraalVM technologies to the OpenJDK community. The reorganization into the jdk.graal
namespace sets the stage for potential future integration of Graal-related innovations into mainstream JDK releases.
Released on the same day as Java 22, which was published March 19, GraalVM for JDK 22 can be downloaded from the project website. Most features of JDK 22 are available for Graal JIT compilation and Native Image AOT compilation. Java 22 features supported in both Graal JIT and Native Image include string templates, the class-file API, unnamed variables and patterns, structured concurrency, and scoped values.
GraalVM binaries are smaller, start faster, provide peak performance with no warmup, and use less memory and CPU than applications running on the JVM. GraalVM Native Image compiles Java applications ahead of time into standalone binaries. And in addition to supporting Java, GraalVM provides runtimes for languages such as Python, JavaScript, and Ruby.
Overall, GraalVM for JDK 22 represents a significant advancement in Java runtime technology, offering developers a powerful toolkit for optimizing performance, enhancing security, and streamlining application deployment across diverse computing environments.