public final class ApplicationLoader
extends java.net.URLClassLoader
| Modifier and Type | Method and Description |
|---|---|
static java.util.jar.JarFile |
getCodeJar()
Get the
JarFile this application has been loaded from. |
static java.net.URL |
getDirectURL(java.net.URL u)
Get the direct URL and remove a possibly existing resource
re-direct.
|
java.lang.Class<?> |
loadClass(java.lang.String name) |
static void |
main(java.lang.String[] args)
Perform Classloader initialization and then invoke the actual main class.
|
static void |
registerURLStreamHandlerFactory(java.lang.String protocol,
java.net.URLStreamHandlerFactory factory)
Register an additional
URLStreamHandlerFactory. |
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstanceclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic static void registerURLStreamHandlerFactory(java.lang.String protocol,
java.net.URLStreamHandlerFactory factory)
URLStreamHandlerFactory.
Only one factory can be set per VM. Therefore this function is provided to add additional factories to the factory set by this loader.
protocol - The protocol to register the factory for.factory - The URLStreamHandlerFactory to register.public static java.util.jar.JarFile getCodeJar()
throws java.io.IOException
JarFile this application has been loaded from.JarFile or null if the application was not
loaded from a release Jar.java.io.IOException - if an I/O error occurs while opening the Jar.public static java.net.URL getDirectURL(java.net.URL u)
By using this function the application can provide resource access via one of the JDK's standard URL handlers for code that cannot handle a custom URL handler.
u - The URL to get the direct URL.public static void main(java.lang.String[] args)
args - The program's command line.public java.lang.Class<?> loadClass(java.lang.String name)
throws java.lang.ClassNotFoundException
loadClass in class java.lang.ClassLoaderjava.lang.ClassNotFoundException