new PrivilegedAction() {
@Override
public Object run() {
try {
URLClassLoader pl = new URLClassLoader(getJars(ext));
ModulesRegistry registry = new StaticModulesRegistry(pl);
locator = registry.createServiceLocator("default");
return pl;
} catch (IOException ex) {
// any failure here is fatal
LOG.log(Level.SEVERE, strings.getLocalString("modules.class.loader.failed", "Failed to create a ClassLoader for modules directory."), ex);
}