public List<Class<?>> getClassesFromJar(File file, ClassLoader classLoader)
    {
        final List<Class<?>> classes = new ArrayList<Class<?>>();
        try
        {
            final JarFile jarFile = new JarFile(file);
            Enumeration<JarEntry> enumeration = jarFile.entries();
            while (enumeration.hasMoreElements())
            {
                final JarEntry jarEntry = enumeration.nextElement();
                if (jarEntry.isDirectory() ||
                    !jarEntry.getName().toLowerCase().trim().endsWith(".class"))
                {
                    continue;
                }
                classes.add(classLoader.loadClass(jarEntry.getName().replace(".class", "").replace("/", ".")));
            }
            jarFile.close();
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
        catch (ClassNotFoundException e)
        {
            e.printStackTrace();
        }
        return classes;
    }