Set application classloader on the Rhino context to our app classloader.
This commit is contained in:
parent
275d882f92
commit
0c9ecfd10d
2 changed files with 3 additions and 0 deletions
|
@ -69,6 +69,7 @@ public final class RhinoCore {
|
|||
Context context = Context.enter();
|
||||
|
||||
context.setCompileFunctionsWithDynamicScope(true);
|
||||
context.setApplicationClassLoader(app.getClassLoader());
|
||||
wrapper = new WrapMaker();
|
||||
wrapper.setJavaPrimitiveWrap(false);
|
||||
context.setWrapFactory(wrapper);
|
||||
|
|
|
@ -79,6 +79,7 @@ public class RhinoEngine implements ScriptingEngine {
|
|||
core = getRhinoCore(app);
|
||||
context = Context.enter();
|
||||
context.setCompileFunctionsWithDynamicScope(true);
|
||||
context.setApplicationClassLoader(app.getClassLoader());
|
||||
|
||||
try {
|
||||
global = new GlobalObject(core, app); // context.newObject(core.global);
|
||||
|
@ -144,6 +145,7 @@ public class RhinoEngine implements ScriptingEngine {
|
|||
public void updatePrototypes() {
|
||||
context = Context.enter();
|
||||
context.setCompileFunctionsWithDynamicScope(true);
|
||||
context.setApplicationClassLoader(app.getClassLoader());
|
||||
context.setWrapFactory(core.wrapper);
|
||||
|
||||
boolean trace = "true".equals(app.getProperty("rhino.trace"));
|
||||
|
|
Loading…
Add table
Reference in a new issue