private static Class<?> loadClass(URL[] urls,String name) throws ClassNotFoundException {
  ClassLoader parent=getRMIContextClassLoader();
  if (loaderLog.isLoggable(Log.VERBOSE)) {
    loaderLog.log(Log.VERBOSE,"(thread context class loader: " + parent + ")");
  }
  SecurityManager sm=System.getSecurityManager();
  if (sm == null) {
    try {
      Class<?> c=Class.forName(name,false,parent);
      if (loaderLog.isLoggable(Log.VERBOSE)) {
        loaderLog.log(Log.VERBOSE,"class \"" + name + "\" found via "+ "thread context class loader "+ "(no security manager: codebase disabled), "+ "defined by "+ c.getClassLoader());
      }
      return c;
    }
 catch (    ClassNotFoundException e) {
      if (loaderLog.isLoggable(Log.BRIEF)) {
        loaderLog.log(Log.BRIEF,"class \"" + name + "\" not found via "+ "thread context class loader "+ "(no security manager: codebase disabled)",e);
      }
      throw new ClassNotFoundException(e.getMessage() + " (no security manager: RMI class loader disabled)",e.getException());
    }
  }
  Loader loader=lookupLoader(urls,parent);
  try {
    if (loader != null) {
      loader.checkPermissions();
    }
  }
 catch (  SecurityException e) {
    try {
      Class<?> c=loadClassForName(name,false,parent);
      if (loaderLog.isLoggable(Log.VERBOSE)) {
        loaderLog.log(Log.VERBOSE,"class \"" + name + "\" found via "+ "thread context class loader "+ "(access to codebase denied), "+ "defined by "+ c.getClassLoader());
      }
      return c;
    }
 catch (    ClassNotFoundException unimportant) {
      if (loaderLog.isLoggable(Log.BRIEF)) {
        loaderLog.log(Log.BRIEF,"class \"" + name + "\" not found via "+ "thread context class loader "+ "(access to codebase denied)",e);
      }
      throw new ClassNotFoundException("access to class loader denied",e);
    }
  }
  try {
    Class<?> c=loadClassForName(name,false,loader);
    if (loaderLog.isLoggable(Log.VERBOSE)) {
      loaderLog.log(Log.VERBOSE,"class \"" + name + "\" "+ "found via codebase, "+ "defined by "+ c.getClassLoader());
    }
    return c;
  }
 catch (  ClassNotFoundException e) {
    if (loaderLog.isLoggable(Log.BRIEF)) {
      loaderLog.log(Log.BRIEF,"class \"" + name + "\" not found via codebase",e);
    }
    throw e;
  }
}

private static Class < ? > loadClass ( URL [ ] urls , String name ) throws ClassNotFoundException { ClassLoader parent = getRMIContextClassLoader ( ) ; if ( loaderLog . isLoggable ( Log . VERBOSE ) ) { loaderLog . log ( Log . VERBOSE , "(thread context class loader: " + parent + ")" ) ; } SecurityManager sm = System . getSecurityManager ( ) ; if ( sm == null ) { try { Class < ? > c = Class . forName ( name , false , parent ) ; if ( loaderLog . isLoggable ( Log . VERBOSE ) ) { loaderLog . log ( Log . VERBOSE , "class \"" + name + "\" found via " + "thread context class loader " + "(no security manager: codebase disabled), " + "defined by " + c . getClassLoader ( ) ) ; } return c ; } catch ( ClassNotFoundException e ) { if ( loaderLog . isLoggable ( Log . BRIEF ) ) { loaderLog . log ( Log . BRIEF , "class \"" + name + "\" not found via " + "thread context class loader " + "(no security manager: codebase disabled)" , e ) ; } throw new ClassNotFoundException ( e . getMessage ( ) + " (no security manager: RMI class loader disabled)" , e . getException ( ) ) ; } } Loader loader = lookupLoader ( urls , parent ) ; try { if ( loader != null ) { loader . checkPermissions ( ) ; } } catch ( SecurityException e ) { try { Class < ? > c = loadClassForName ( name , false , parent ) ; if ( loaderLog . isLoggable ( Log . VERBOSE ) ) { loaderLog . log ( Log . VERBOSE , "class \"" + name + "\" found via " + "thread context class loader " + "(access to codebase denied), " + "defined by " + c . getClassLoader ( ) ) ; } return c ; } catch ( ClassNotFoundException unimportant ) { if ( loaderLog . isLoggable ( Log . BRIEF ) ) { loaderLog . log ( Log . BRIEF , "class \"" + name + "\" not found via " + "thread context class loader " + "(access to codebase denied)" , e ) ; } throw new ClassNotFoundException ( "access to class loader denied" , e ) ; } } try { Class < ? > c = loadClassForName ( name , false , loader ) ; if ( loaderLog . isLoggable ( Log . VERBOSE ) ) { loaderLog . log ( Log . VERBOSE , "class \"" + name + "\" " + "found via codebase, " + "defined by " + c . getClassLoader ( ) ) ; } return c ; } catch ( ClassNotFoundException e ) { if ( loaderLog . isLoggable ( Log . BRIEF ) ) { loaderLog . log ( Log . BRIEF , "class \"" + name + "\" not found via codebase" , e ) ; } throw e ; } }
load a class from the rmi class loader corresponding to the given codebase url path in the current execution context .
