Here you can find the source of getURL(String aPath)
public static URL getURL(String aPath)
//package com.java2s; import java.io.File; import java.net.URL; public class Main { /**//from w w w . j av a 2s . com * 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); } }