Code example for URLClassLoader

Methods: loadClass

0
 
					try { 
						String urlString = "file:////" + absolutePath
								+ File.separator + name;
						URL url = new URL(urlString);
						ClassLoader classLoader = new URLClassLoader(
								new URL[] { url });
						Class<?> pluginClass;
						pluginClass = classLoader.loadClass(clazz);
						tabbedContent = (TabbedContent) pluginClass
								.newInstance();
					} catch (Exception e) {
						log.error("Unexpected Error", e);
					} 
				} 
			} 
		} 
 
		/** 
		 * Returns the TabbedContent object that was defined in the xml being 
		 * parsed.