Top Description Constructors Methods
com.sun.star.lib.unoloader

public final Class UnoLoader

extends Object
Class Inheritance
Imports
java.io.IOException, java.lang.reflect.InvocationTargetException, java.net.MalformedURLException, .URL, java.security.AccessController, .PrivilegedActionException, .PrivilegedExceptionAction

A helper class for executing UNO JARs.

This class is not yet stable.

Since
UDK 3.2.0

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
execute(final URL
a base URL relative to which the URE JARs (libreoffice.jar, etc.) can be found; must not be null.
base
,
URL
the URL of a UNO JAR that specifies a Main-Class; must not be null.
jar
,
String[]
any arguments passed to the main method of the specified Main-Class of the given JAR jar; must not be null.
arguments
)

Executes a UNO JAR.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

UnoLoaderback to summary
private UnoLoader()

Method Detail

executeback to summary
public static void execute(final URL base, URL jar, String[] arguments) throws IOException, ClassNotFoundException, NoSuchMethodException, InvocationTargetException

Executes a UNO JAR.

Parameters
base:URL

a base URL relative to which the URE JARs (libreoffice.jar, etc.) can be found; must not be null.

jar:URL

the URL of a UNO JAR that specifies a Main-Class; must not be null.

arguments:String[]

any arguments passed to the main method of the specified Main-Class of the given JAR jar; must not be null.

Exceptions
IOException:
if the given base URL is malformed, or if there are any problems processing the given JAR jar.
ClassNotFoundException:
if the given JAR jar does not specify a Main-Class, or if the specified Main-Class cannot be found.
NoSuchMethodException:
if the specified Main-Class of the given JAR jar does not have an appropriate main method.
InvocationTargetException:
if an exception occurs while executing the main method of the specified Main-Class of the given JAR jar.