Here you can find the source of getResourceFromClasspath(final String fileName)
public static URL getResourceFromClasspath(final String fileName)
//package com.java2s; //License from project: Apache License import java.net.URL; public class Main { public static URL getResourceFromClasspath(final String fileName) { return Thread.currentThread().getContextClassLoader().getResource(fileName); }//from w w w . j a va 2 s . c o m }