public static Collection<URL> forJavaClassPath() {
        Collection<URL> urls = new ArrayList<URL>();
        String javaClassPath = System.getProperty("java.class.path");
        if (javaClassPath != null) {
            for (String path : javaClassPath.split(File.pathSeparator)) {
                try {
                    urls.add(new File(path).toURI().toURL());
                } catch (Exception e) {
                    if (Reflections.log != null) {
                        Reflections.log.warn("Could not get URL", e);
                    }
                }
            }
        }
        return distinctUrls(urls);
    }
public static Collection < URL > forJavaClassPath ( ) { Collection < URL > urls = new ArrayList < URL > ( ) ; String javaClassPath = System . getProperty ( "java.class.path" ) ; if ( javaClassPath != null ) { for ( String path : javaClassPath . split ( File . pathSeparator ) ) { try { urls . add ( new File ( path ) . toURI ( ) . toURL ( ) ) ; } catch ( Exception e ) { if ( Reflections . log != null ) { Reflections . log . warn ( "Could not get URL" , e ) ; } } } } return distinctUrls ( urls ) ; }
Returns a distinct collection of URLs based on the {@code java.class.path} system property.
<p>
This finds the URLs using the {@code java.class.path} system property.
<p>
The returned collection of URLs retains the classpath order.

@return the collection of URLs, not null