Why would I want to use Rhino 184.108.40.206?
But maybe you have some technical reason why you prefer Mozilla's Rhino which has some special functionalities that are not in Nashorn.
How do I use it?
The code is a Maven project.
In your project, add rhino-js-engine as a dependency:
<dependency> <groupId>cat.inspiracio</groupId> <artifactId>rhino-js-engine</artifactId> <version>220.127.116.11</version> </dependency>
You don't need to add Rhino itself since it is pulled in by rhino-js-engine.
In your java code, get the scripting engine called "rhino":
import javax.script.*; ScriptEngineManager manager=new ScriptEngineManager(); ScriptEngine engine=manager.getEngineByName("rhino");
Now you can call the script engine methods: