Context cx = Context.enter();
injectDefineScript = new InjectDefineScript(this);
ScriptableObject globalScope = this.getJavaScriptEngine().getGlobalScope();
globalScope.put("global", globalScope, globalScope);
Require require = this.createRequire(cx, globalScope);
require.install(globalScope);
this.raptor = (ScriptableObject) this.getJavaScriptEngine().invokeMethod(globalScope, "require", "raptor");
injectDefineScript.setRaptor(raptor);
this.resourceManager.addSearchPathEntry(new ClasspathSearchPathEntry(RaptorJSEnv.class, "/META-INF/resources"));