JDK 17: Migrate from Nashorn JS engine
JDK 17 removed the Nashorn JavaScript engine [1]. This breaks DSE, which expects a JavaScript engine to be registered out-of-the-box. The most commonly accepted alternative to the removed Nashorn engine appears to be Graal.JS, with a migration guide readily available [2]. As ScriptEngine is not extensively used, the code changes required a fairly minimal to ship and consume Graal.JS along TTool. However, there are complicated considerations regarding combining it with GraalVM to improve performance:
- Optimal configuration requires experimental features to be enabled and module path upgrades [3].
- In a quick and dirty integration test, their class path isolation feature malfunctioned for unknown reasons.
[1] https://openjdk.org/jeps/372
[2] https://www.graalvm.org/latest/reference-manual/js/NashornMigrationGuide/
[3] https://www.graalvm.org/22.1/reference-manual/js/RunOnJDK/#graalvm-javascript-on-jdk-11