Hi Rony,
> just realized that I had submitted the entire snippet to the OOo snippet
> database,
[...]
I tried to implement it and it seems to work partly. I can remove
already registered components successfully.
But I have problems registering my Extension. Registering it manually
works great, thus I know the Extension is fine, although its an old
extension (.uno.pkg). My code seems also to find the package, because
passing the wrong path returns a worse error message.
Here is the error message:
-----%<-----
com.sun.star.deployment.DeploymentException: Fehler beim Hinzufügen von:
JudasComponent.und.pkg
-----%<-----
"Fehler beim Hinzufügen von" is German and means "Failure when adding...".
Here ist the code:
-----%<----
String packageURL =
"/home/tobias/workspace/OOComNG/oocom/unopkg/JudasComponent.uno.pkg";
//Creating a UNO compatible File URL
String packageUNOURL = OODocument.createUNOFileURL(packageURL);
String mediaType = "application/vnd.sun.star.uno-component;type=Java";
// Use String "vnd.sun.star.tdoc:///4711/uno_packages" for transient,
// "user" for local, "shared" for global package installation
XPackageManager xPM = getPackageManager("user");
try {
xPM.addPackage(packageUNOURL, mediaType, null, null);
}
catch (Exception e) {
System.out.println(e);
}
-----%<----
I think the mediaType is wrong. But what media type should I use to add
a complete Extension Package? I tried adding the jar file contained in
the package, but I got the same error...
Maybe someone can help me...
Greetings, Tobias
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]