equal
deleted
inserted
replaced
251 } |
251 } |
252 |
252 |
253 this.env = new ScriptEnvironment(options, out, err); |
253 this.env = new ScriptEnvironment(options, out, err); |
254 this._strict = env._strict; |
254 this._strict = env._strict; |
255 this.appLoader = appLoader; |
255 this.appLoader = appLoader; |
256 this.scriptLoader = (ScriptLoader)AccessController.doPrivileged( |
256 this.scriptLoader = env._loader_per_compile? null : createNewLoader(); |
257 new PrivilegedAction<ClassLoader>() { |
|
258 @Override |
|
259 public ClassLoader run() { |
|
260 return new ScriptLoader(sharedLoader, Context.this); |
|
261 } |
|
262 }); |
|
263 this.errors = errors; |
257 this.errors = errors; |
264 |
258 |
265 // if user passed -classpath option, make a class loader with that and set it as |
259 // if user passed -classpath option, make a class loader with that and set it as |
266 // thread context class loader so that script can access classes from that path. |
260 // thread context class loader so that script can access classes from that path. |
267 final String classPath = options.getString("classpath"); |
261 final String classPath = options.getString("classpath"); |