public static Object loadInstance(Class clazz) throws ClassException {
  try {
    return clazz.newInstance();
  }
 catch (  InstantiationException e) {
    throw new ClassException("the specified class object [" + clazz.getName() + "()] cannot be instantiated");
  }
catch (  IllegalAccessException e) {
    throw new ClassException("can't load class because the currently executing method does not have access to the definition of the specified class");
  }
}

public static Object loadInstance ( Class clazz ) throws ClassException { try { return clazz . newInstance ( ) ; } catch ( InstantiationException e ) { throw new ClassException ( "the specified class object [" + clazz . getName ( ) + "()] cannot be instantiated" ) ; } catch ( IllegalAccessException e ) { throw new ClassException ( "can't load class because the currently executing method does not have access to the definition of the specified class" ) ; } }
loads a class from a string classname
