import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.ArrayList;
import java.net.URL;
import java.util.jar.JarFile;
import java.util.jar.JarEntry;
import java.util.Enumeration;
import java.net.URLClassLoader;
import java.net.MalformedURLException;
import java.io.IOException;

// Adapted from
// http://stackoverflow.com/questions/11016092/how-to-load-classes-at-runtime-from-a-folder-or-jar

public class Verify {
    public static void main(String[] args) throws IOException,
                                                  MalformedURLException,
                                                  ClassNotFoundException {
        for (String pathToJar: args) {
            JarFile jarFile = new JarFile(pathToJar);
            Enumeration<JarEntry> e = jarFile.entries();

            URL[] urls = { new URL("jar:file:" + pathToJar+"!/") };
            URLClassLoader cl = URLClassLoader.newInstance(urls);

            while (e.hasMoreElements()) {
                JarEntry je = e.nextElement();
                if(je.isDirectory() || !je.getName().endsWith(".class")){
                    continue;
                }
                // -6 because of .class
                String className = je.getName().substring(0,je.getName().length()-6);
                className = className.replace('/', '.');
                Class.forName(className, true, cl);
            }

            System.out.println("All classes passed verification.");
        }
    }
}

@@ -59,20 +59,19 @@
 va.util.
-List
+Map
 ;%0Aimport
@@ -85,17 +85,15 @@
 til.
-ArrayList
+HashMap
 ;%0Aim
@@ -651,16 +651,47 @@
 ption %7B%0A
+        long inputsFailed = 0;%0A
         
@@ -966,16 +966,126 @@
 e(urls);
+%0A            Map%3CString, Throwable%3E failed = new HashMap%3CString, Throwable%3E();%0A            int numClasses = 0;
 %0A%0A      
@@ -1472,16 +1472,42 @@
 , '.');%0A
+                try %7B%0A    
         
@@ -1566,76 +1566,868 @@
     
-%7D%0A%0A            System.out.println(%22All classes passed verification.%22
+    %7D catch (Throwable t) %7B%0A                    failed.put(className, t);%0A                %7D%0A%0A                numClasses++;%0A            %7D%0A%0A            int numFailed = failed.size();%0A            int passed = numClasses - numFailed;%0A%0A            System.out.println(%22%5B%22 + passed + %22 of %22 + numClasses + %22%5D Generated classes passed verification. ( %22  + pathToJar + %22 )%22);%0A            if (numFailed %3E 0) %7B%0A                System.err.println(%22The following %22 + (numFailed %3E 1? numFailed + %22 classes%22 : %22class%22) +  %22 failed to verify:%22);%0A                for (Map.Entry%3CString, Throwable%3E entry : failed.entrySet()) %7B%0A                    System.err.println(%22- %22 + entry.getKey());%0A                    entry.getValue().printStackTrace();%0A                %7D%0A                inputsFailed++;%0A            %7D%0A        %7D%0A%0A        if (inputsFailed %3E 0) %7B%0A            System.exit(1
 );%0A 

Update Verify script to be more descriptive