Here you can find the source of findResources(String name)
public static List<URL> findResources(String name)
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.net.URL; import java.util.*; public class Main { public static List<URL> findResources(String name) { try {//from www . ja va 2s.c o m Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources(name); List<URL> ret = new ArrayList<URL>(); while (resources.hasMoreElements()) { ret.add(resources.nextElement()); } return ret; } catch (IOException e) { throw new RuntimeException(e); } } }