This commit is contained in:
chenxi071990 2014-09-22 14:22:55 +08:00
parent dbc5bdf7bb
commit c1a9241511
1 changed files with 4 additions and 2 deletions

View File

@ -22,6 +22,7 @@ public class ClassHelper {
URLClassLoader classLoader = (URLClassLoader) Thread
.currentThread().getContextClassLoader();
URL[] urls = classLoader.getURLs();
for (URL url : urls) {
if (url.getProtocol().equals("file")) {
File file = new File(url.getFile());
@ -69,7 +70,8 @@ public class ClassHelper {
classNames.add(className);
}
} else if (filePath.endsWith(".jar")) {
classNames.addAll(getClassNameFromJar(packageName, true, new File(filePath)));
classNames.addAll(getClassNameFromJar(packageName, true,
new File(filePath)));
}
}
}