wait, I do find a oracle example where they do mul...
# scripting
a
wait, I do find a oracle example where they do multiple evals:
Copy code
// evaluate JavaScript code that defines an object with one method
        engine.eval("var obj = new Object()");
        engine.eval("obj.hello = function(name) { print('Hello, ' + name) }");

        // expose object defined in the script to the Java application
        Object obj = engine.get("obj”);