Here you can find the source of getUrl(String inPath)
public static URL getUrl(String inPath) throws Exception
//package com.java2s; //License from project: Open Source License import java.net.URL; public class Main { public static URL getUrl(String inPath) throws Exception { return new URL(ClassLoader.getSystemResource("") + inPath); }//from w w w . ja v a2s. c om }