public static ArrayList<Class<?>> getClassesFromFolders(File dir, File parentFile) throws ClassNotFoundException, MalformedURLException
	{
		final ArrayList<Class<?>> classes = new ArrayList<Class<?>>();

		if (dir.isDirectory())
		{
			for (int i = 0; i < dir.listFiles().length; i++)
			{
				if (dir.listFiles()[i].isDirectory())
				{
					classes.addAll(getClassesFromFolders(dir.listFiles()[i], parentFile));
				}
				else if (dir.listFiles()[i].toString().endsWith(".class"))
				{
					final URLClassLoader cl = URLClassLoader.newInstance(new URL[] { parentFile.toURI().toURL() });
					final Class<?> clazz = cl.loadClass(dir.listFiles()[i].toString().split(parentFile.getName() + "/")[1].replaceAll(".class", "").replaceAll("/", "."));

					classes.add(clazz);
				}
			}
		}
		return classes;
	}