rhino-script-engine icon indicating copy to clipboard operation
rhino-script-engine copied to clipboard

Simplify rhino dependency update

Open ic3fox opened this issue 10 years ago • 0 comments

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,

ic3fox avatar Aug 21 '15 12:08 ic3fox