GROOVYSH.execute("import groovy.grape.Grape");
GROOVYSH.setResultHook(new ResultHookClosure(GROOVYSH, STANDARD_IO, STANDARD_RESULT_PROMPT));
GROOVYSH.setHistory(new History());
final InteractiveShellRunner runner = new InteractiveShellRunner(GROOVYSH, new PromptClosure(GROOVYSH, STANDARD_INPUT_PROMPT));
runner.setErrorHandler(new ErrorHookClosure(runner, STANDARD_IO));
try {
runner.setHistory(new History(new File(System.getProperty("user.home") + "/" + HISTORY_FILE)));
} catch (IOException e) {
STANDARD_IO.err.println("Unable to create history file: " + HISTORY_FILE);
}
Gremlin.load();
initializeShellWithScript(STANDARD_IO, initScriptFile, GROOVYSH);
try {
runner.run();
} catch (Error e) {
//System.err.println(e.getMessage());
}
}