code: public static String findMainClass(JarFile jarFile, String classesLocation)
              throws IOException {
          return doWithMainClasses(jarFile, classesLocation,
                  new ClassNameCallback<String>() {
                      @Override
                      public String doWith(String className) {
                          return className;
                      }
                  });
      }
docs: Find the 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