'/' + path.substring(0, endIndex),
path.substring(endIndex));
}
CacheManager cacheManager = new CacheManager(null);
sctx.setSecurityDomain(new RhinoSecurityDomain() {
@Override
public CodeSource getCodeSource() throws ScriptException {
try {
URL url = new File(fileName).getCanonicalFile().toURI().toURL();
return new CodeSource(url, (Certificate[]) null);