public void setMainClass(String mainClass) {
    if ((mainClass == null) || (mainClass.length() == 0)) throw new IllegalArgumentException("Main class cannot be null or empty");
    this.mainClass = mainClass;
  }