Here you can find the source of getUrlsFromClassPath(String path)
public static List<URL> getUrlsFromClassPath(String path)
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.net.URL; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; public class Main { public static List<URL> getUrlsFromClassPath(String path) { List<URL> urls = new ArrayList<>(); try {/*from w w w . ja va2 s . co m*/ Enumeration<URL> e = ClassLoader.getSystemResources(path); while (e.hasMoreElements()) { urls.add(e.nextElement()); } } catch (IOException e) { } return urls; } }