Code example for URLClassLoader

Methods: loadClass

0
 
		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. 
Contextual code suggestions in your IDE  Get Codota for Java