|
|
com.sun.star.lib.unoloader
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
| Constructor Summary | |
UnoClassLoader(URL base,
ClassLoader parent)
Instantiates the root UNO class loader. |
|
| Method Summary | |
void |
execute(URL jar,
String[] arguments)
Executes a UNO JAR. |
ClassLoader |
getClassLoader(URL jar,
Attributes mainAttributes)
Obtains a class loader for a UNO JAR. |
static Attributes |
getJarMainAttributes(URL jar)
Obtains the main section of the manifest of a JAR. |
| 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.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
UnoClassLoader
public UnoClassLoader(URL base, ClassLoader parent) throws MalformedURLException
- Instantiates the root UNO class loader.
- Parameters:
base- a base URL relative to which the URE JARs (java_uno.jar,juh.jar,jurt.jar,ridl.jar) can be found; must not benull.parent- the parent class loader for delegation.- Throws:
MalformedURLException- if the givenbaseURL is malformed.
| Method Detail |
getClassLoader
public ClassLoader getClassLoader(URL jar, Attributes mainAttributes) throws MalformedURLException
- Obtains a class loader for a UNO JAR.
- Parameters:
jar- the URL of a UNO JAR; must not benull.mainAttributes- represents the main section of the manifest of the given JARjar;nullif the given JAR does not have a manifest. (This redundant parameter is there for performance reasons, as typically the caller of this method already has this information available.)- Returns:
- an appropriate class loader; will never be
null. - Throws:
MalformedURLException- if the givenjarURL or any of the UNO-Type-Path URLs specified in the given JAR are malformed.
execute
public void execute(URL jar, String[] arguments) throws IOException, ClassNotFoundException, NoSuchMethodException, InvocationTargetException
- Executes a UNO JAR.
- Parameters:
jar- the URL of a UNO JAR that specifies a Main-Class; must not benull.arguments- any arguments passed to themainmethod of the specified Main-Class of the given JARjar; must not benull.- Throws:
IOException- if there are any problems processing the given JARjar.ClassNotFoundException- if the given JARjardoes not specify a Main-Class, or if the specified Main-Class cannot be found.NoSuchMethodException- if the specified Main-Class of the given JARjardoes not have an appropriatemainmethod.InvocationTargetException- if an exception occurs while executing themainmethod of the specified Main-Class of the given JARjar.
getJarMainAttributes
public static Attributes getJarMainAttributes(URL jar) throws IOException
- Obtains the main section of the manifest of a JAR.
- Parameters:
jar- the URL of a JAR; must not benull.- Returns:
- the representation of the main section of the manifest of the
given JAR
jar, ornullif the given JAR does not have a manifest. - Throws:
IOException- if there are any problems processing the given JARjar.
|
UDK 3.2.0 Java API Reference | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||


