* @return the classloader
* @throws Exception for any error
*/
private ClassLoader initBootLibraries() throws Exception
{
ClassLoaderSystem system = ClassLoaderSystem.getInstance();
mbeanServer.registerMBean(system, new ObjectName("jboss.classloader:service=ClassLoaderSystem"));
List<URL> list = getBootURLs();
VirtualFile[] files = new VirtualFile[list.size()];
for (int i = 0; i < list.size(); ++i)
{
URL url = list.get(i);
files[i] = VFS.getChild(url);
}
VFSClassLoaderPolicy policy = new VFSClassLoaderPolicy(files);
policy.setExportAll(ExportAll.NON_EMPTY);
policy.setImportAll(true);
ClassLoader classLoader = system.registerClassLoaderPolicy(policy);
if (classLoader instanceof RealClassLoader)
bootstrapUCLName = ((RealClassLoader) classLoader).getObjectName();
return classLoader;
}