public URL getResourceFrom ( String name , AbstractClassLoader first ) { if ( name . length ( ) == 0 ) return null ; if ( name . charAt ( 0 ) == ' ' ) name = name . substring ( 1 ) ; URL url = null ; // try with the first one if ( first != null ) url = first . getResourceURL ( name ) ; // then, try on other libraries if ( url == null ) { for ( int i = 0 ; i < libs . size ( ) ; i ++ ) { AbstractClassLoader cl = libs . get ( i ) ; if ( cl == first ) continue ; url = cl . getResourceURL ( name ) ; if ( url != null ) break ; } } if ( url == null ) url = AppClassLoader . class . getClassLoader ( ) . getResource ( name ) ; return url ; }
Search a resource looking first into the given library .