Here you can find the source of getUrlFromUrlPath(String path)
private static URL getUrlFromUrlPath(String path)
//package com.java2s; //License from project: Open Source License import java.net.MalformedURLException; import java.net.URL; public class Main { private static URL getUrlFromUrlPath(String path) { try {/* w w w. j av a 2 s . c om*/ return new URL(path); } catch (MalformedURLException e) { return null; } } }