Graal: Use graal via the standard JDK 11 installation

Created on 3 Oct 2018  路  4Comments  路  Source: oracle/graal

Hello,

I have project used Nashorn Javascript engine. I'm trying to migrate to java11 and also migrate from Nashorn to Graal. I've read that I can use graal via the standard JDK installation starting from JDK 11 - https://medium.com/graalvm/oracle-graalvm-announces-support-for-nashorn-migration-c04810d75c1f
Also I've read there that Graal-SDK are uploaded to Maven central, and that there is java flag polyglot.js.nashorn-compat for easy migration. I've used both but when I'm trying to get engine by name "graal.js", I've got null:
ScriptEngine engine = engineManager.getEngineByName("graal.js")
Also I've read that Graal SDK requires GraalVM to run - should I use it with standard JDK installation?

Most helpful comment

We will publish some documentation and examples on "Graal on JDK11" shortly.

All 4 comments

@wirthi I've figured out that this code works (with compat option) on java from graalvm build (currently java8). Is it correct that there is no way to use graal engine on OpenJDK 11 build with some maven dependencies?

We will publish some documentation and examples on "Graal on JDK11" shortly.

Hi @wirthi , I am looking at the same thing. Any updates?

@ElliotZhang, demo was published here - https://github.com/graalvm/graal-js-jdk11-maven-demo

Was this page helpful?
0 / 5 - 0 ratings