code: public void setMainClass (final Class <?> type)
    {
      this.mainClass = (type != null) ? type.getName () : null;
      addClassPathEntry (type);
    }
docs: Sets the class on which to invoke the <code>main()</code> method. The
  source of the specified class will automatically be added to the class path
  of the forked JVM.
  
  @param type
  The class on which to invoke the <code>main()</code> method, may be
  <code>null</code>.