@SuppressWarnings("unchecked")
    public static ArrayList<LearningPlugin> loadPlugin(String filePath) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException{

        ArrayList<LearningPlugin> plugins = new ArrayList<LearningPlugin>();
        
        URLClassLoader loader = new URLClassLoader(new URL[] {new URL(filePath)});
        JarFile jarFile = new JarFile(filePath);
        Enumeration<JarEntry> allEntries = jarFile.entries();
        while (allEntries.hasMoreElements()) {
            JarEntry entry = (JarEntry) allEntries.nextElement();
            String name = entry.getName();
            if(name.endsWith(".class")){
                Class clazz = loader.loadClass(name.replace(".class", ""));
                if(clazz.equals(LearningPlugin.class))
                    plugins.add((LearningPlugin) clazz.newInstance());
            }
        }
        
        loader.close();
        jarFile.close();
        
        return plugins;
    }