|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
org.bounce.JarClassLoader
public class JarClassLoader
A class loader for loading resources and classes out of a jar file. Overrides the findClass and the findResource methods.
| Constructor Summary | |
|---|---|
JarClassLoader(ClassLoader parent,
URL url)
Creates a new JarClassLoader that will allow the loading of classes stored in the jar file supplied. |
|
JarClassLoader(URL url)
Creates a new JarClassLoader that will allow the loading of classes stored in the jar file supplied. |
|
| Method Summary | |
|---|---|
Class |
findClass(String name)
Checks the contents table for an occurence of the class. |
URL |
findResource(String name)
Checks the contents table for an occurence of the resource file. |
| Methods inherited from class java.security.SecureClassLoader |
|---|
defineClass, defineClass, getPermissions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JarClassLoader(URL url)
throws IOException
url - the URL of the jar file
IOException - an error happened while reading
the contents of the jar file.
public JarClassLoader(ClassLoader parent,
URL url)
throws IOException
parent - the parent classloader.url - the URL of the jar file
IOException - an error happened while reading
the contents of the jar file.| Method Detail |
|---|
public Class findClass(String name)
throws ClassNotFoundException
findClass in class ClassLoadername - the name of the class.
ClassNotFoundException - the jar file did not contain
the class.public URL findResource(String name)
findResource in class ClassLoadername - the name of the resource.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||