ScriptEngineManager factory = new ScriptEngineManager();
this.engine = factory.getEngineByName("JavaScript");
if (this.engine == null){
this.getLogman().error(NO_JAVASCRIPT_MESSAGE);
} else {
Invocable inv = (Invocable)this.engine;
//File f = new File(this.getJarPath());
InputStreamReader reader = new InputStreamReader(getClass()
.getClassLoader()
.getResourceAsStream("boot.js"));
this.engine.eval(reader);
inv.invokeFunction("__scboot", this, engine, getClass().getClassLoader());
}
Canary.commands().registerCommands(this, this, false);
}catch(Exception e){
e.printStackTrace();