code: public static URL ensureURL(String path ) {
  		path = systemToUnix(path);
  		URL url;
  		try {
  			url = new URL(path);
  			if( url.getProtocol().equals("jar")) {
  				return simplifyJarPath(url);
  			}
  		} catch (MalformedURLException e) {
  			// might just be a file reference.
  			try {
  				url = new File(path).toURI().toURL(); // simplify the path. "1/2/../3" = "1/3"
  			} catch (MalformedURLException e2) {
  				return null;
  			}
  		}
  		return url;
  	}
docs: Given a path which may or may not be a URL return a URL