ScriptUtil
Script Utility - ScriptUtil
Introduction
Encapsulation of Script execution tools.
Usage
ScriptUtil.eval
Executes Javascript scripts with the script string as the parameter.
Example:
ScriptUtil.eval("print('Script test!');");
ScriptUtil.compile
Compiles the script and returns aCompiledScript
object.
Example:
CompiledScript script = ScriptUtil.compile("print('Script test!');");
try {
script.eval();
} catch (ScriptException e) {
throw new ScriptRuntimeException(e);
}