Created
April 11, 2009 19:43
-
-
Save jashkenas/93695 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URL[] urlList = new URL[archives.length]; | |
for (int j = 0; j < urlList.length; j++) { | |
urlList[j] = archives[j].toURL(); | |
} | |
URLClassLoader loader = new URLClassLoader(urlList); | |
String className = null; | |
for (int j = 0; j < archives.length; j++) { | |
className = findClassInZipFile(folders[i].getName(), archives[j]); | |
if (className != null) break; | |
} | |
// If no class name found, just move on. | |
if (className == null) continue; | |
Class toolClass = Class.forName(className, true, loader); | |
final Tool tool = (Tool) toolClass.newInstance(); | |
tool.init(Editor.this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment