Nashorn Standalone 15.3 engine returned is null
Andreas Mueller
am at iit.de
Tue Jul 13 13:33:29 UTC 2021
Hi,
I’ve added Nashorn to Java 15 and it is properly displayed when listing the engines:
2021-07-13 15:14:30.233/sys$streams/INFORMATION/starting, available Scripting Engines:
2021-07-13 15:14:30.246/sys$streams/INFORMATION/name=OpenJDK Nashorn, version=15.3, language name=ECMAScript, language version=ECMA - 262 Edition 5.1, names=[nashorn, Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript]
However, when I get the engine with name “JavaScript” it returns null:
engine = manager.getEngineByName((String) entity.getProperty("script-language").getValue());
if (engine == null)
throw new Exception("Engine for script-language '" + entity.getProperty("script-language").getValue() + "' not found!");
2021-07-13 15:14:30.361/ERROR/Exception occured: java.lang.Exception: Engine for script-language 'JavaScript' not found!
Any ideas what the problem could be?
Thanks,
Andreas
--
Andreas Mueller
IIT Software GmbH
http://www.swiftmq.com <http://www.swiftmq.com>
More information about the nashorn-dev
mailing list