public class JarClassLoader extends SecureClassLoader
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
defineClass, defineClass, getPermissions
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public JarClassLoader(URL url) throws IOException
url
- the URL of the jar fileIOException
- 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 fileIOException
- an error happened while reading
the contents of the jar file.public Class findClass(String name) throws ClassNotFoundException
findClass
in class ClassLoader
name
- the name of the class.ClassNotFoundException
- the jar file did not contain
the class.public URL findResource(String name)
findResource
in class ClassLoader
name
- the name of the resource.Copyright © 2002-2013 Edwin Dankert. All Rights Reserved.