Skip to content

Instantly share code, notes, and snippets.

@nipunthathsara
Created April 11, 2020 10:03
Show Gist options
  • Save nipunthathsara/3db1bbd70a339d79a64f1749544d4ab1 to your computer and use it in GitHub Desktop.
Save nipunthathsara/3db1bbd70a339d79a64f1749544d4ab1 to your computer and use it in GitHub Desktop.
Launcher$ExtClassLoader.java getExtDir method
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