public class JarClassLoader extends SecureClassLoader
| Constructor and Description |
|---|
JarClassLoader(JarFile jar)
Creates the Jar file class loader using the default parent class loader for delegation.
|
JarClassLoader(JarFile jar,
ClassLoader parent)
Creates the Jar file class loader using the default parent class loader for delegation.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addJar(JarFile jar)
Adds an entry to a Jar file.
|
protected Class<?> |
findClass(String name)
Finds the class with the specified binary name.
|
static JarFile |
getJar(String jarFileName)
Gets a Jar file from an URL.
|
InputStream |
getResourceAsStream(String name)
Open for reading, a resource of the specified name from the search path used to load classes.
|
defineClass, defineClass, getPermissionsclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic JarClassLoader(JarFile jar) throws IOException
jar - the Jar file for the class path.parent - the Parent class loader.IOExceptionpublic JarClassLoader(JarFile jar, ClassLoader parent) throws IOException
jar - the Jar file for the class path.parent - the Parent class loader.IOExceptionpublic static void addJar(JarFile jar)
public static JarFile getJar(String jarFileName)
jarFileName - The Jar file name.protected Class<?> findClass(String name) throws ClassNotFoundException
findClass in class ClassLoadername - The binary name of the classClassNotFoundException - If the class could not be found.ClassLoader.findClass(java.lang.String)public InputStream getResourceAsStream(String name)
getResourceAsStream in class ClassLoadername - the name of the resource.ClassLoader.getResourceAsStream(java.lang.String)Phantom® and NetPhantom® are registered trademarks of Nexum Technologies SARL.
© Copyright Nexum Technologies SARL, 2011. All rights reserved.