Code example for URLClassLoader

Methods: loadClass

		if (StringUtils.isBlank(className)) {
			throw new IllegalArgumentException("className cannot be null");
		URLClassLoader clazzLoader = new URLClassLoader(urls, classLoader);
		logger.trace("Loading class " + className + " with ClassLoader "
				+ classLoader.getClass().getSimpleName());
		Class clazz = clazzLoader.loadClass(className);
		return clazz.newInstance();
	 * Adds the given file path to the classpath and creates an instance of the 
	 * given class name. 
	 * @param filePath 
	 *            the path of the file to add to the classpath. 
Connect your IDE to all the code out there  Get Codota for Java