code: public static String findSingleMainClass(File rootFolder) throws IOException {
          MainClassesCallback callback = new MainClassesCallback();
          MainClassFinder.doWithMainClasses(rootFolder, callback);
          return callback.getMainClass();
      }
docs: Find a single main class from a given folder.
  
  @param rootFolder the root folder to search
  @return the main class or {@code null}
  @throws IOException if the folder cannot be read