Remove Nashorn or bundle it?
Phillipus opened this issue · 4 comments
- The Nashorn script engine is old now and is removed from Java > 15
- Archi ships with Java 11 which includes Nashorn so jArchi can use Nashorn bundled with Java
- We ship the GraalVM script engine with jArchi which is far superior
- Archi 5 will be built with and bundled with Java 17 (see archimatetool/archi#867) so Nashorn will not be available as part of Java
However there is a stand-alone version of Nashorn that we could bundle with jArchi if required.
But does anyone still use Nashorn given that GraalVM is superior?
I have an issue in one of my scripts "Export to Markdown" which fails in GraalVM with the following error:
Script Error: javax.script.ScriptException: org.graalvm.polyglot.PolyglotException: TypeError: escape.replaceAll is not a function
However, this works fine in Nashorn...
It's something that I need to debug, but haven't found the time to look at yet...
That script will work with the coming version of jArchi 1.3 because it will have latest GraalVM.
Awesome! I look forward to the update :D
I've created a separate Nashorn plug-in for jArchi. This will be made available as an optional download after Archi 5 is released.