URL[] () { String classpath = SystemProperties.getProperty("java.class.path", "."); StringTokenizer tok = new StringTokenizer(classpath, File.pathSeparator, true); ArrayList list = new ArrayList(); while (tok.hasMoreTokens()) { String s = tok.nextToken(); if (s.equals(File.pathSeparator)) addFileURL(list, "."); else { addFileURL(list, s); if (tok.hasMoreTokens()) { // Skip the separator. tok.nextToken(); // If the classpath ended with a separator, // append the current directory. if (!tok.hasMoreTokens()) addFileURL(list, "."); } } } URL[] urls = new URL[list.size()]; list.toArray(urls); return urls; }