static ClassLoader createLoader(){
  List<URL> urls=new ArrayList<>();
  for (  String name : new String[]{"java.class.path","jdk.module.path"}) {
    String value=System.getProperty(name);
    if (value != null) {
      addURLsFromPath(urls,value);
    }
  }
  for (int i=0; addPatchPaths(urls,i); i++) {
  }
  return new URLClassLoader(urls.toArray(new URL[urls.size()]));
}

static ClassLoader createLoader ( ) { List < URL > urls = new ArrayList < > ( ) ; for ( String name : new String [ ] { "java.class.path" , "jdk.module.path" } ) { String value = System . getProperty ( name ) ; if ( value != null ) { addURLsFromPath ( urls , value ) ; } } for ( int i = 0 ; addPatchPaths ( urls , i ) ; i ++ ) { } return new URLClassLoader ( urls . toArray ( new URL [ urls . size ( ) ] ) ) ; }
creates a class loader than can access all resources in all modules on the module path .
