|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
com.edsdev.jconvert.util.JCClassLoader
Used to load classes that are not in the classpath, by loading them from a specific directory/jar file. The class
will be loaded from the default classloaders first if possible, so do not use this mechanism to somehow override
existing classes that are in the classpath. This is a wrapper around java.net.URLClassLoader and only provides
convienince, sinplicity, safety, better exception processing, and better exception messages.
Example of use:
ClassLoader loader = new JCClassLoader("i:/somepath/myjar-1.0.6.jar"); Object main = loader.loadClass("com.mydomain.myproject.MyClass").newInstance(); ClassLoader fileLoader = new JCClassLoader("i:/temp/"); Object temp = fileLoader.loadClass("com.test.MyTestClass").newInstance()
Constructor Summary | |
JCClassLoader(java.lang.String pPath)
Constructs this class loader with the specified path. |
Method Summary | |
protected java.lang.Class |
findClass(java.lang.String className)
|
Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, 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 |
Constructor Detail |
public JCClassLoader(java.lang.String pPath)
pPath
- String representation of the directory or jar fileMethod Detail |
protected java.lang.Class findClass(java.lang.String className) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |