Running the OpenLegacy API with GraalVM JDK

When running the OpenLegacy API, you may notice the following Warning:

[engine] WARNING: The polyglot engine uses a fallback runtime that does not support runtime compilation to native code.
Execution without runtime compilation will negatively impact the guest application performance.
The following cause was found: JVMCI is not enabled for this JVM. Enable JVMCI using -XX:+EnableJVMCI.
For more information see: https://www.graalvm.org/latest/reference-manual/embed-languages/#runtime-optimization-support.
To disable this warning use the '--engine.WarnInterpreterOnly=false' option or the '-Dpolyglot.engine.WarnInterpreterOnly=false' system property.

The warning you're seeing indicates that the polyglot engine (used for running languages like JavaScript within your Java application via GraalVM) is currently using a fallback runtime that lacks support for runtime compilation to native machine code. As a result, execution will be performed only in interpreted mode, which will degrade the performance of your guest application (JavaScript in this case).

To avoid this Warning, you can run the API using GraalVM JDK - GraalVM Community JDK 21.0.2

Using the above JDK, run the JAR with the following command:

java -XX:+EnableJVMCI -jar {YOUR_JAR}