private static ArrayList<Class<?>> getClassesFromJar(String jarName) {
    	ArrayList<Class<?>> classes = new ArrayList<Class<?>>();
    	URL url = null;
    	try {
			url = new URL("file:///" + jarName);
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}
    	
		URLClassLoader urlLoader = new URLClassLoader(new URL[] {url});
    	
    	ArrayList<String> resources = getResourceNamesFromJar(jarName);
    	for (String resource : resources) {
    		if (resource.endsWith(".class")) {
    			resource = resource.substring(0, resource.lastIndexOf('.'));
	    		Class<?> c = null;
				try {
					c = urlLoader.loadClass(resource);
					classes.add(c);
				} catch (ClassNotFoundException e) {
					e.printStackTrace();
				}
    		}
    	}
    	
    	try {
			urlLoader.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
    	
    	return classes;
    }