BT

Facilitating the spread of knowledge and innovation in professional software development

Contribute

Topics

Choose your language

InfoQ Homepage News GraalVM 21.3 Supports Java 17

GraalVM 21.3 Supports Java 17

This item in japanese

Lire ce contenu en français

Bookmarks

Oracle Labs released GraalVM 21.3, featuring support for Java 17 and JDK Flight Recorder (JFR) for low-overhead production profiling of native Java executables. Compared to version 21.1 from April 2021, this release creates 14% smaller native executables for Spring PetClinic JDBC with 20% less build time. The release runs applications faster and begins to support the Java Platform Module System.

GraalVM also starts interpreted non-native Java applications faster now. This helps during development where running native Java executables is not practical due to lengthy build times.

GraalVM comes in two editions: Community Edition and Enterprise Edition. The Community Edition's GPL with "Classpath" Exception license means it is "free to use for any purpose and comes with no strings attached, but also no guarantees or support." Its releases get updates for one year. The Enterprise Edition requires the Oracle Java SE subscription for production use, paid for either per user or per processor.

The Enterprise Edition also includes support by Oracle and has exclusive performance and security features, such as profile-guided optimizations and the G1 garbage collector. That is why its native executables reach 98% of the OpenJDK performance in a benchmark mix vs. 43% with the Community Edition, all while using less memory and starting up faster than OpenJDK applications.

Oracle claims that native executables from the Enterprise Edition are even up to 40% faster than OpenJDK in some machine-learning scenarios. Constant Blinding is an example of a security feature in Enterprise Edition. It defends against JIT spraying attacks and can be enabled with -Dgraal.BlindConstants=true.

A new build-time configuration option for native executables allows disabling features like reflection, JNI, Dynamic Proxy objects and excluding classpath resources if a class is not reachable. That can lead to smaller native executables.

The new proftool (Linux only for now) collects runtime performance metrics of Java applications from the JVM, the Linux perf tool, and the HotSpot LogCompilation. This helps with JIT performance analysis.

The GraalVM Polyglot Runtime runs multiple languages besides Java. The JavaScript runtime was updated to Node.js 14.17.6 and improved its WebAssembly support. The Python runtime can now run HPy binary packages without recompilation. It also supports the multiprocessing module to orchestrate tasks across multiple Python contexts on a multi-core machine and has a socket module written in native code.

Ruby on GraalVM now uses TRegex, a more efficient regular expression engine, and is up to 9x faster in some benchmarks. The R runtime upgraded from PCRE to PCRE2 version 10.37. The LLVM toolchain for compiling C/C++ was updated to version 12.0.1. And WebAssembly runs faster in some scenarios on GraalVM Enterprise Edition.

The GraalVM tooling improved in Visual Studio Code: the GraalVM Tools for Java can attach to native executables for debugging. And the GraalVM Tools for Micronaut can deploy, run and debug Micronaut applications in a Kubernetes cluster.

Spring Native, a new Spring initiative, creates native executables for Spring applications. Version 0.11, scheduled for release on November 19, 2021, will rely on GraalVM 21.3 and the upcoming release of Spring Boot 2.6. Kubernetes native Java stack Quarkus will use GraalVM 21.3 as the recommended version in the forthcoming 2.5 release. Full-stack framework Micronaut will officially support GraalVM 21.3 with the upcoming release of version 3.2.0 scheduled for late November or December 2021.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT