mvn install
- Add
org.graalvm.polyglot
intoorg.osgi.framework.system.packages.extra
in the${KARAF_HOME}/etc/config.properties
- Set GraalVM 8 or 11 as a default JDK
export JAVA_HOME=/path/to/graalvm
- Start Karaf
${KARAF_HOME}/bin/karaf
- Verify that
org.graalvm.polyglot
is exported
karaf@root()> package:exports
...
org.graalvm.polyglot │ 0.0.0 │ 0 │ org.apache.felix.framework
...
karaf@root()> feature:repo-add mvn:org.graalvm/polyglot-command-features/LATEST/xml
karaf@root()> feature:install org-graalvm-polyglot-command
karaf@root()> polyglot:eval 1+3
Evaluating `1+3` in js
Result: 4