public static Class forName(String className, boolean initialize, ClassLoader classLoader) throws ClassNotFoundException, LinkageError, ExceptionInInitializerError { if (classLoader == null) { SecurityManager security = System.getSecurityManager(); if (security != null) { ClassLoader parentCL = VM_Class.getClassLoaderFromStackFrame(1); if (parentCL != null) { try { security.checkPermission(new RuntimePermission("getClassLoader")); } catch (SecurityException e) { throw new ClassNotFoundException( "Security exception when" + " trying to get a classloader so we can load the" + " class named \"" + className +"\"", e); } } } classLoader = VM_BootstrapClassLoader.getBootstrapClassLoader(); } return forNameInternal(className, initialize, classLoader);
public static Class forName(String typeName) throws ClassNotFoundException { ClassLoader parentCL = VM_Class.getClassLoaderFromStackFrame(1); return forNameInternal(typeName, true, parentCL);
  public static Class forName(String className,                               boolean initialize,                               ClassLoader classLoader)     throws ClassNotFoundException,           LinkageError,           ExceptionInInitializerError {    if (classLoader == null) {      SecurityManager security = System.getSecurityManager();      if (security != null) {        ClassLoader parentCL = VM_Class.getClassLoaderFromStackFrame(1);        if (parentCL != null) {          try {            security.checkPermission(new RuntimePermission("getClassLoader"));          } catch (SecurityException e) {            throw new ClassNotFoundException(                                             "Security exception when"                                             + " trying to get a classloader so we can load the"                                             + " class named \"" + className +"\"", e);          }        }      }      classLoader = VM_BootstrapClassLoader.getBootstrapClassLoader();    }    return forNameInternal(className, initialize, classLoader);  }