Code example for URLClassLoader

0
		 
		AbstractVFSDeployment deployment = (AbstractVFSDeployment) context.getDeployment();
		VirtualFile root = deployment.getRoot();
		URL url = root.getHandler().toURL();
		 
		URLClassLoader cl = new URLClassLoader(new URL[] {url}, current);
		context.setClassLoader(cl);
		 
		// Hack to get the PreInstallAction working 
		Thread.currentThread().setContextClassLoader(cl);
		 
		return context.getClassLoader();
	} 
}