code: public static Map<File, Exception> addFolderToClasspath(File folder, FileFilter fileFilter) throws ReflectiveOperationException {
  
  		Map<File, Exception> ret = Maps.newHashMap();
  
  		URLClassLoader sysURLClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();
  		Class<? extends URLClassLoader> classLoaderClass = URLClassLoader.class;
  
  		Method method = classLoaderClass.getDeclaredMethod("addURL", URL.class);
  		method.setAccessible(true);
  		for (File f : folder.listFiles(fileFilter)) {
  			try {
  				method.invoke(sysURLClassLoader, f.toURI().toURL());
  			} catch (ReflectiveOperationException | IOException e) {
  				ret.put(f, e);
  			}
  		}
  		return ret;
  	}
docs: Adds all files in the folder that the FileFilter accepts to the classpath
  
  @param folder     The folder into which the files to add are
  @param fileFilter The filter that tells what files should be added and which not
  @return A mapping of the errored files to their corresponding exception.
  @throws ReflectiveOperationException If the system class loader doesn't have an "addUrl" method