rhino-script-engine
rhino-script-engine copied to clipboard
Simplify rhino dependency update
The reference of the Rhino version is stored in the RhinoScriptEngineFactory. To get the RhinoScriptEngine, user should use following code :
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine scriptEngine = manager.getEngineByName("rhino17R5");
I propose to add a generic name, which will not be in conflicts with the JDK rhino script engine, so it will not be necessary to change it if we update the Rhino version. Something like :
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine scriptEngine = manager.getEngineByName("mozilla.rhino");
Cheers,