chrriis.common
Class NetworkURLClassLoader
java.lang.Object
java.lang.ClassLoader
chrriis.common.NetworkURLClassLoader
public class NetworkURLClassLoader
- extends ClassLoader
A class loader that loads classes from a given codebase.
- Author:
- Christopher Deckers
Constructor Summary |
NetworkURLClassLoader(String codebase)
Construct a network URL classloader, that will load resources from the given codebase. |
Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NetworkURLClassLoader
public NetworkURLClassLoader(String codebase)
throws MalformedURLException
- Construct a network URL classloader, that will load resources from the given codebase.
- Parameters:
codebase
- the codebase to load the resources from.
- Throws:
MalformedURLException
findResource
protected URL findResource(String name)
- Overrides:
findResource
in class ClassLoader
findClass
protected Class<?> findClass(String name)
throws ClassNotFoundException
- Overrides:
findClass
in class ClassLoader
- Throws:
ClassNotFoundException
main
public static void main(String[] args)
throws Exception
- Throws:
Exception