question: private static URL [ ] pathToURLs ( String path ) { String [ ] components = path . split ( File . pathSeparator ) ; URL [ ] urls = new URL [ components . length ] ; int count = 0 ; while ( count < components . length ) { URL url = fileToURL ( new File ( components [ count ] ) ) ; if ( url != null ) { urls [ count ++ ] = url ; } } if ( urls . length != count ) { URL [ ] tmp = new URL [ count ] ; System . arraycopy ( urls , 0 , tmp , 0 , count ) ; urls = tmp ; } return urls ; }
target:  Utility method for converting a search path string to an array of directory and JAR file URLs.