Tobias Krais wrote:
Hi again,I want to use first time the office beans, but it does not work. As soon as I want to use the css.comp.beans.OOoBean.loadFromURL(url, null) method I get the following error: -----%<----- Exception in thread "main" java.lang.UnsatisfiedLinkError: no officebean in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at com.sun.star.lib.util.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:72) at com.sun.star.comp.beans.LocalOfficeConnection.<clinit>(LocalOfficeConnection.java:153) at com.sun.star.comp.beans.OOoBean.getOOoConnection(OOoBean.java:288) at com.sun.star.comp.beans.OOoBean.getMultiServiceFactory(OOoBean.java:308) at com.sun.star.comp.beans.OOoBean.loadFromURL(OOoBean.java:578) at de.designtouse.oobean.OOoSwtViewer.setDocument(OOoSwtViewer.java:31) at de.designtouse.oobean.OOoSwtSnippet.main(OOoSwtSnippet.java:55) -----%<----- I tried this in Eclipse and added the officebean.jar to the build path as I did with the ridl.jar, ... . After searching the web I saw, that the OO css.lib.loader.Loader class should add the officebean.jar automatically. So I tried to create a fitting jar, but it loads all needed jars out of the officebean.jar.
officebean.jar is not among the jars loaded by com.sun.star.lib.loader.Loader, see javaunohelper/com/sun/star/comp/helper/UnoInfo.java:1.6 getJars, called from odk/source/com/sun/star/lib/loader/Loader.java:1.4 getCustomLoader.
And it would IMO be a mistake to add it (at least in the current form). There are effectively three mechanisms how a Java client can connect to an OOo:
- Do everything by hand. The client needs either its own copies of the URE jars or access to the OOo's copies, and needs to know where the OOo is located.
- Use Simple Bootstrap. The client only needs to include a copy of the com.sun.star.lib.loader stub provided by the SDK, everything else is handled transparently for the client.
- Use the Officebean. The client needs either its own copy of officebean.jar or access to the OOo's copy, everything else is then again handled transparently for the client.
Unfortunately, Officebean does not re-use the Simple Bootstrap, but is completely independent. What is probably necessary is to unite the two (there might even be an issue for that somewhere).
I hope this helps to clarify the picture. -Stephan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
