Instantly share code, notes, and snippets.

@h4wkst3r / Secret
Last active Aug 15, 2018

What would you like to do?
Example invoking Nashorn Javascript Engine from Java
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
public class test {
public static void main(String[] args) throws ScriptException {
// initialize nashorn scripting engine
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine nashorn = manager.getEngineByName("nashorn");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment