public static Set < String > getResources ( String pResource ) throws IOException { List < ClassLoader > clls = findClassLoaders ( ) ; if ( clls . size ( ) != 0 ) { Set < String > ret = new HashSet < String > ( ) ; for ( ClassLoader cll : clls ) { Enumeration < URL > urlEnum = cll . getResources ( pResource ) ; ret . addAll ( extractUrlAsStringsFromEnumeration ( urlEnum ) ) ; } return ret ; } else { return extractUrlAsStringsFromEnumeration ( ClassLoader . getSystemResources ( pResource ) ) ; } }
Get all resources from the classpath which are specified by the given path .