*/
private ScannedClassLoader setupClassLoader(String serverURL) {
fireConnecting(BUNDLE.getString("Creating classloader"));
// TODO: use the serverURL
ModulePluginList list = ModuleUtils.fetchPluginJars(serverURL);
List<URL> urls = new ArrayList<URL>();
if (list == null) {
logger.warning("Unable to configure classlaoder, falling back to " +
"system classloader");
return new ScannedClassLoader(new URL[0],
getClass().getClassLoader());
}
for (JarURI uri : list.getJarURIs()) {
try {
// check the filter to see if we should add this URI
if (LoginManager.getPluginFilter().shouldDownload(this, uri)) {
urls.add(uri.toURL());
}