public ResourceHandle getResource ( URL [ ] sources , String name ) { Set < URL > visited = new HashSet <> ( ) ; for ( URL source : sources ) { ResourceHandle h = getResource ( source , name , visited , null ) ; if ( h != null ) { return h ; } } return null ; }
Gets resource with given name at the given search path . The path is searched iteratively one URL at a time . If the URL points to a directory the name is the file path relative to this directory . If the URL points to the JAR file the name identifies an entry in that JAR file . If the URL points to the JAR file the resource is not found in that JAR file and the JAR file has Class - Path attribute the JAR files identified in the Class - Path are also searched for the resource .