getEngineByName(“nashorn”) returns null
问题 Cant get Nashorn engine ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn"); engine.eval("print('Hello World!');"); engine returns null I am using eclipse, jdk1.8.0_11 java -version java version "1.8.0_20-ea" Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b23) 回答1: Its working when I pass null param into ScriptEngineManager constructor: ScriptEngine engine = new ScriptEngineManager(null).getEngineByName("nashorn"); engine.eval("print('Hello World!');"); from java