import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import javax.script.ScriptEngine;
public class ExecuteJScript {
public static void main (String[] args) {
ScriptEngineManager manager = new ScriptEngineManager ();
ScriptEngine engine = manager.getEngineByName ("js");
String script = "print ('Bonjour javaScript')";
try {
engine.eval (script);
} catch (ScriptException e) {
System.out.print(e.getMessage());
}
}
}
//Bonjour javaScript