Issue
I am trying to get my application running with java 11. Im building my own jre and have included the module java.scripting
yet at runtime this call
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("JavaScript");
sets engine
to null
.
I know Nashorn is deprecated from Java 11 but it hasn't actually been removed so why am I getting this issue ?
Solution
How about adding the module jdk.scripting.nashorn
to the module graph?
java --add-modules jdk.scripting.nashorn
Can you try this?
Answered By - ZhekaKozlov
Answer Checked By - Robin (JavaFixing Admin)