Created
April 11, 2020 10:03
-
-
Save nipunthathsara/3db1bbd70a339d79a64f1749544d4ab1 to your computer and use it in GitHub Desktop.
Launcher$ExtClassLoader.java getExtDir method
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
static class ExtClassLoader extends URLClassLoader { | |
public static ExtClassLoader getExtClassLoader() throws IOException | |
{ | |
final File[] dirs = getExtDirs(); | |
... | |
} | |
private static File[] getExtDirs() { | |
String s = System.getProperty("java.ext.dirs"); | |
File[] dirs; | |
if (s != null) { | |
StringTokenizer st = | |
new StringTokenizer(s, File.pathSeparator); | |
int count = st.countTokens(); | |
dirs = new File[count]; | |
for (int i = 0; i < count; i++) { | |
dirs[i] = new File(st.nextToken()); | |
} | |
} else { | |
dirs = new File[0]; | |
} | |
return dirs; | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment