|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.ClassLoader | +--java.security.SecureClassLoader | +--java.net.URLClassLoader | +--org.argouml.application.security.ArgoJarClassLoader
A class loader for loading jar files, both local and remote. This source was taken primarily from Sun's tutorial
Constructor Summary | |
ArgoJarClassLoader(java.net.URL url)
Creates a new ClassLoader for the specified url. |
Method Summary | |
java.lang.String |
getMainClassName()
Returns the name of the jar file main class, or null if no "Main-Class" manifest attributes was defined. |
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. |
Methods inherited from class java.net.URLClassLoader |
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance |
Methods inherited from class java.security.SecureClassLoader |
defineClass |
Methods inherited from class java.lang.ClassLoader |
defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setSigners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ArgoJarClassLoader(java.net.URL url)
url
- the url of the jar fileMethod Detail |
public java.lang.String getMainClassName() throws java.io.IOException
public 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 applicationjava.lang.ClassNotFoundException
- if the specified class could not
be foundjava.lang.NoSuchMethodException
- if the specified class does not
contain a "main" methodjava.lang.reflect.InvocationTargetException
- if the application raised an
exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML (c) 1996-2002 |