private void processJarfile(URL resource, String pkgname, Set<Class<? extends Job>> classes) {

    String relPath = pkgname.replace('.', '/');
    String resPath = resource.getPath().replace("%20", " ");
    String jarPath = resPath.replaceFirst("[.]jar[!].*", ".jar").replaceFirst("file:", "");
    logger.debug("Reading JAR file: '" + jarPath + "'");
    JarFile jarFile;
    try {
      jarFile = new JarFile(jarPath);
    } catch (IOException e) {
      throw new RuntimeException("Unexpected IOException reading JAR File '" + jarPath + "'", e);
    }
    Enumeration<JarEntry> entries = jarFile.entries();
    while (entries.hasMoreElements()) {
      JarEntry entry = entries.nextElement();
      String entryName = entry.getName();
      String className = null;
      if (entryName.endsWith(".class") && entryName.startsWith(relPath) && entryName.length() > (relPath.length() + "/".length())) {
        className = entryName.replace('/', '.').replace('\\', '.').replace(".class", "");
      }
      logger.debug("JarEntry '" + entryName + "'  =>  class '" + className + "'");
      if (className != null) {
        filterJobClassWithExceptionCatch(className, classes);
      }
    }
  }