Here you can find the source of loadAutoConfigFiles(ClassLoader classLoader, String resourceName)
protected static List<URL> loadAutoConfigFiles(ClassLoader classLoader, String resourceName)
//package com.java2s; /*//from w ww . ja v a 2s. c o m * Copyright 2011-2016 ZXC.com All right reserved. This software is the confidential and proprietary information of * ZXC.com ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into with ZXC.com. */ import java.io.IOException; import java.net.URL; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; public class Main { protected static List<URL> loadAutoConfigFiles(ClassLoader classLoader, String resourceName) { try { List<URL> urlList = new ArrayList<URL>(); Enumeration<URL> urls = classLoader.getResources(resourceName); for (; urls.hasMoreElements();) { URL url = urls.nextElement(); urlList.add(url); } return urlList; } catch (IOException e) { return new ArrayList<URL>(); } } }