Here you can find the source of getURLs(String thePaths[])
public static URL[] getURLs(String thePaths[])
//package com.java2s; import java.io.File; import java.net.URL; public class Main { /**//from w w w. j a v a 2 s .c o m * Returns the URLs for given paths. */ public static URL[] getURLs(String thePaths[]) { URL urls[] = new URL[thePaths.length]; for (int i = 0; i < thePaths.length; i++) urls[i] = getURL(thePaths[i]); return urls; } /** * Returns a URL for given path. */ public static URL getURL(String aPath) { try { return getFile(aPath).toURI().toURL(); } catch (Exception e) { throw new RuntimeException(e); } } /** * Returns a File for given path. */ public static File getFile(String aPath) { return new File(aPath); } }