code: public static String findSingleMainClass(JarFile jarFile, String classesLocation)
              throws IOException {
          MainClassesCallback callback = new MainClassesCallback();
          MainClassFinder.doWithMainClasses(jarFile, classesLocation, callback);
          return callback.getMainClass();
      }
docs: Find a single main class in a given jar file.
  
  @param jarFile         the jar file to search
  @param classesLocation the location within the jar containing classes
  @return the main class or {@code null}
  @throws IOException if the jar file cannot be read