public Class < ? > loadSystemClass ( final String name ) throws ClassNotFoundException { if ( System . getSecurityManager ( ) == null ) { ClassLoader systemClassLoader = ClassLoader . getSystemClassLoader ( ) ; return ( systemClassLoader != null ) ? systemClassLoader . loadClass ( name ) : bootClassLoader . loadClass ( name ) ; } try { return AccessController . doPrivileged ( new PrivilegedExceptionAction < Class < ? > > ( ) { @ Override public Class < ? > run ( ) throws Exception { ClassLoader systemClassLoader = ClassLoader . getSystemClassLoader ( ) ; return ( systemClassLoader != null ) ? systemClassLoader . loadClass ( name ) : bootClassLoader . loadClass ( name ) ; } } , controlContext ) ; } catch ( PrivilegedActionException e ) { if ( e . getException ( ) instanceof ClassNotFoundException ) throw ( ClassNotFoundException ) e . getException ( ) ; throw ( RuntimeException ) e . getException ( ) ; } }
Returns a Class . Tries to load a class from the System ClassLoader or if that doesn t exist tries the boot ClassLoader