global = new GlobalObject(core, app); global.setPrototype(core.global); global.setParentScope(null);
global = new GlobalObject(core, app, true);
    public synchronized void init(Application app, RequestEvaluator reval) {        this.app = app;        this.reval = reval;        core = getRhinoCore(app);        context = Context.enter();        context.setCompileFunctionsWithDynamicScope(true);        context.setApplicationClassLoader(app.getClassLoader());        try {            global = new GlobalObject(core, app);            global.setPrototype(core.global);            global.setParentScope(null);            extensionGlobals = new HashMap();            if (Server.getServer() != null) {                Vector extVec = Server.getServer().getExtensions();                for (int i = 0; i < extVec.size(); i++) {                    HelmaExtension ext = (HelmaExtension) extVec.get(i);                    try {                        HashMap tmpGlobals = ext.initScripting(app, this);                        if (tmpGlobals != null) {                            extensionGlobals.putAll(tmpGlobals);                        }                    } catch (ConfigurationException e) {                        app.logEvent("Couldn't initialize extension " + ext.getName() + ": " +                                 e.getMessage());                    }                }            }        } catch (Exception e) {            System.err.println("Cannot initialize interpreter");            System.err.println("Error: " + e);            e.printStackTrace();            throw new RuntimeException(e.getMessage());        } finally {            Context.exit ();        }    }