@SuppressWarnings("unchecked")
	// We can safely ignore the warnings because it's being checked
	public void loadAllClasses() {
		new Thread(new Runnable() {

			@Override
			public void run() {
				// Create a File object on the root of the directory containing
				// the
				// class file
				SorterLoader.this.classes.clear();
				SorterLoader.this.sorters.clear();
				File file = new File(classpath);
				SorterLoader.this.listener.onSorterLoadingStarted();
				try {
					// Convert File to a URL
					URL url = file.toURI().toURL(); // file:/c:/myclasses/
					URL[] urls = new URL[] { url };

					// Create a new class loader with the directory
					@SuppressWarnings("resource")
					// Bug in JDK.
					ClassLoader cl = new URLClassLoader(urls);

					String[] directories = getSubdirectories();

					int i = 0;
					for (String folder : directories) {
						SorterLoader.this.listener.onSorterLoaded(i++,
								directories.length);
						try {
							Class<?> clazz = cl.loadClass(folder + ".Sorter");

							classes.add(clazz);
						} catch (ClassNotFoundException e) {
							e.printStackTrace();
						} catch (NoClassDefFoundError e) {
							e.printStackTrace();
						}
					}

				} catch (MalformedURLException e) {
					e.printStackTrace();
				}
				SorterLoader.this.listener.onSorterLoadingFinished();

				if (debug) {
					System.out.println("[Debug] Loaded Classes:");
					System.out.println("____________________");
					for (Class<BaseSorter> c : classes) {
						System.out.println(c.getPackage().getName() + "    "
								+ c.getName());
					}
				}
			}

		}).start();

	}