|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ClassLoader java.security.SecureClassLoader java.net.URLClassLoader net.sourceforge.fluxion.pussycat.util.JarClassLoader
public class JarClassLoader
A class loader for loading jar files, both local and remote.
Constructor Summary | |
---|---|
JarClassLoader(java.lang.String s)
Creates a new JarClassLoader for the specified string which is then converted to a URL. |
|
JarClassLoader(java.net.URL url)
Creates a new JarClassLoader for the specified url. |
Method Summary | |
---|---|
void |
getAllMethods(java.lang.String name)
Gets the allMethods attribute of the JarClassLoader object |
java.lang.String |
getMainClassName()
Returns the name of the jar file main class, or null if no "Main-Class" manifest attributes was defined. |
java.lang.Object |
instantiate(java.lang.String name)
Description of the Method |
void |
invokeClass(java.lang.String name,
java.lang.String[] args)
Invokes the application in this jar file given the name of the main class and an array of arguments. |
void |
invokeClass(java.lang.String name,
java.lang.String method,
java.lang.String[] args)
Description of the Method |
Methods inherited from class java.net.URLClassLoader |
---|
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance |
Methods inherited from class java.security.SecureClassLoader |
---|
defineClass, defineClass |
Methods inherited from class java.lang.ClassLoader |
---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, 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 JarClassLoader(java.net.URL url)
url
- the url of the jar filepublic JarClassLoader(java.lang.String s) throws java.net.MalformedURLException
s
- Description of the Parameter
java.net.MalformedURLException
- Description of the ExceptionMethod Detail |
---|
public java.lang.String getMainClassName() throws java.io.IOException
java.io.IOException
- Description of the Exceptionpublic void invokeClass(java.lang.String name, java.lang.String[] args) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException
name
- the name of the main classargs
- the arguments for the application
java.lang.ClassNotFoundException
- if the specified class could not
be found
java.lang.NoSuchMethodException
- if the specified class does not
contain a "main" method
java.lang.reflect.InvocationTargetException
- if the application raised an
exceptionpublic void invokeClass(java.lang.String name, java.lang.String method, java.lang.String[] args) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException
name
- Description of the Parametermethod
- Description of the Parameterargs
- Description of the Parameter
java.lang.ClassNotFoundException
- Description of the Exception
java.lang.NoSuchMethodException
- Description of the Exception
java.lang.reflect.InvocationTargetException
- Description of the Exceptionpublic java.lang.Object instantiate(java.lang.String name) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
name
- Description of the Parameter
java.lang.ClassNotFoundException
- Description of the Exception
java.lang.InstantiationException
- Description of the Exception
java.lang.IllegalAccessException
- Description of the Exceptionpublic void getAllMethods(java.lang.String name) throws java.lang.ClassNotFoundException, java.lang.SecurityException
name
- Description of the Parameter
java.lang.ClassNotFoundException
- Description of the Exception
java.lang.SecurityException
- Description of the Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |