private List<Class<?>> getClassesFromJar(String name) throws ClassNotFoundException {
        List<Class<?>> classes = new ArrayList<Class<?>>();
        try {
        FileInputStream fis = new FileInputStream(name);
        ZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis));
        ZipEntry entry;
         
        //
        // Read each entry from the ZipInputStream until no more entry found
        // indicated by a null return value of the getNextEntry() method.
        //
        while ((entry = zis.getNextEntry()) != null) {
            if(entry.getName().endsWith(".class")){
                Class<?> _class;
                String classname = entry.getName().replaceAll("/", ".").substring(0, entry.getName().length() - 6);
                try {
                    _class = Class.forName(classname);
                } catch (ExceptionInInitializerError e) {
                    // happen, for example, in classes, which depend on 
                    // Spring to inject some beans, and which fail, 
                    // if dependency is not fulfilled
                    _class = Class.forName(classname,
                            false, Thread.currentThread().getContextClassLoader());
                }
                classes.add(_class);
            }
        }
         
        zis.close();
        fis.close();
        } catch (IOException e) {
        e.printStackTrace();
        }
        
        return classes;
    }