private Enumeration < URL > getResources11g ( ClassLoader classLoader , String configFileName ) { List < URL > newProps = new ArrayList < URL > ( ) ; if ( classLoader . getClass ( ) . getSimpleName ( ) . equalsIgnoreCase ( "IdcClassLoader" ) ) { try { Field field = classLoader . getClass ( ) . getField ( "m_zipfiles" ) ; @ SuppressWarnings ( "unchecked" ) Map < String , IdcZipFile > zipFiles = ( Map < String , IdcZipFile > ) field . get ( classLoader ) ; for ( Entry < String , IdcZipFile > entry : zipFiles . entrySet ( ) ) { if ( entry . getValue ( ) . m_entries . get ( configFileName ) != null ) { String jarFile = entry . getKey ( ) ; // windows needs a slash before the C:/ if ( ! jarFile . startsWith ( "/" ) ) { jarFile = "/" + jarFile ; } try { URL u = new URL ( "jar:file:" + entry . getKey ( ) + "!/" + configFileName ) ; newProps . add ( u ) ; } catch ( MalformedURLException e ) { e . printStackTrace ( ) ; } } } } catch ( Exception e ) { // If there is any exception the ClassLoader is an unrecognised format e . printStackTrace ( ) ; } } return Collections . enumeration ( newProps ) ; }
Replacement for getResources which works on 11g .