这段代码为何还要保留着,已经无用了
ClassLoader cloader = ClassTools.getClassLoader();
for (String referPath : referPaths) {
try {
Enumeration<URL> urls = cloader.getResources(referPath);
while (urls.hasMoreElements()) {
URL url = urls.nextElement();
String url_str = url.toString();
if (url_str.contains("jar!")) {
String tmp = url_str.substring(0, url_str.lastIndexOf("jar!") + 3);
if (tmp.startsWith("jar:"))
tmp = tmp.substring("jar:".length());
if (tmp.startsWith("file:/"))
tmp = tmp.substring("file:/".length());
if (tmp.contains("tomcat"))
continue;
if (tmp.contains("Java"))
continue;
//jars.add(tmp);
}
else
registerLocation(new URL(url_str.substring(0, url_str.length() - referPath.length())));
}
}
catch (IOException e) {}
}