Skip to content

Instantly share code, notes, and snippets.

@diablowu
Created August 28, 2017 02:40
Show Gist options
  • Save diablowu/82074313620c87b666a5844c616b1536 to your computer and use it in GitHub Desktop.
Save diablowu/82074313620c87b666a5844c616b1536 to your computer and use it in GitHub Desktop.
public class Parser {
public static void main(String[] args) throws IOException, ResourceException, ScriptException {
GroovyScriptEngine gse = new GroovyScriptEngine(new String[]{"E:/works/dsl/src"});
Binding b = new Binding();
Script script = gse.createScript("main.groovy",b);
script.evaluate("print 123");
script.run();
// gse.run("main.groovy",)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment