Hello Harald,
Only once thank you for your reference, to the information, I has already a connection too openoffice. The connection SWT/Bean already, only unfortunately functions under eclipse, or if I started application at least into eclipse.

At present I refer directly under eclipse to jar the libraries under <OpenOffice> \ program \ classes. In “MANIFEST.MF” is no entry, since I cannot make absolute path-entered.

That seems to be probably the problem, how I come now to the files of openoffice? A delivery with “java - cp <OpenOffice> \ program \ classes \ officebean.jar” does not have an effect.

Like that it is already late (00: 10 German time), here still another further error message of my test, in this case is all OOo jar to files under <Application> \ libs and is also in such a way registered in “MANIFEST.MF”. There is not this error, if I started at least application under Eclipse!! Good night all.., or good morning:)

The Exception / my breakpoint for this time
---------------
C:\sgv>echo %Path%
C:\WINDOWS\system32;C:\WINDOWS\System32\Wbem;D:\dev-database\mysql5\bin;c:\Programme\OpenOffice2\program

C:\sgv>java -jar Starter.jar
java.lang.Exception:
java.io.IOException: CreateProcess: \soffice -nologo -nodefault -accept=pipe,name=Erik+Z_FChlke_25B7Office;urp;StarOffice.ServiceManager error=2 java.io.IOException: CreateProcess: \soffice -nologo -nodefault -accept=pipe,name=Erik+Z_FChlke_25B7Office;urp;StarOffice.ServiceManager error=2
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at com.sun.star.comp.beans.LocalOfficeConnection$OfficeService.startupService(LocalOfficeConnection.java:793) at com.sun.star.comp.beans.LocalOfficeConnection.connect(LocalOfficeConnection.java:344) at com.sun.star.comp.beans.LocalOfficeConnection.getComponentContext(LocalOfficeConnection.java:248)
at com.sun.star.comp.beans.OOoBean.setOOoConnection(OOoBean.java:188)
at com.sun.star.comp.beans.OOoBean.getOOoConnection(OOoBean.java:288)
at com.sun.star.comp.beans.OOoBean.getMultiServiceFactory(OOoBean.java:308)


Harald Weyhing schrieb:
Hi Erik,

as far as I understand your problem, you want to integrate OpenOffice in your SWT-Application using the OOoBean. That's not really difficult, but you need to know some basics about how the bean works.

Basically there are two methods: loadFromURL and loadFromByteArray that will start up OpenOffice for you and connect to it if OpenOffice is not already running. The class LocalOfficeConnection uses the ClassLoader to find the real path on your System to LocalOfficeConnection - this is <OpenOffice>/program/classes.
Yes this i have understand when i read the SDK, OfficeBean. Ok, i have check and modify my code


Now it cut's of "/classes" from this path and starts up <OpenOffice>/program/soffice or <OpenOffice>/program/soffice.exe dependent on your system. Additionally there are some native libs in <OpenOffice>/program that are needed to create a system dependent window to display OpenOffice. Therefore you will need to have <OpenOffice>/program on your $path variable.

To make everything working you need juh.jar, jut.jar, jurt.jar, ridl.jar, sandbox.jar and unoil.jar on your classpath and as described above, you won't be able to move those libs elsewhere if you dont modify the java code of the bean yourself.

You can try some of the samples that come within the SDK within eclipse - just add the jar files above to your project and start the applications. This should give you a first impression how to integrate with plain java and swing. For SWT you can also embedd Swing/AWT in your SWTShell.

Hope that helps.

Cheers
Harald

Erik Zuehlke wrote:

For so some difficulty do not look for I now a solution for my task, much gives it these already, much see I these.

I believe which I that do not understand, much give it in addition, no solution. Even if I repeat myself, shorten described, I have (alone) a SWT/Java application. In this I would like to integrate as closely as possible (when OOoBean) OpenOffice. It is not to become Eclipse RCP application.

Gladly basis place (c:\sgv\?) would like all external libraries (..sgv\libs) placings within (mysql and so one), even if possible of OOo. So my past attempts and after some understanding also my past test were not successful. This application rather a ?Copy and paste? work is and no ?clean? programming, I gladly my understanding would improve.

Can I ?page out and from there use? the OOo Librarys (classes.jar)? Here I receive the error ?UnsatiesfiedLinkError " already meant ´: to NO officebean in java.library.path?, I register now these in the %Path%, effected still the error, although the environment variable contains completely clearly.

If I use directly on the ?classes? in OOo listing access give to ?Conection? problems.

Is it possible, also for others, a step by step guidance create? What means it? Much-calibrated from it a ?Tutorial? should become, with the possibilities of the integration of OpenOffice. It gives so far me now admits three ways, that responds in the server mode, the direct opens from OpenOffice (OpenOffice_Path \ program \ soffice) and as the latter as OOoBean. Is that correct? On all this solutions, where can i use or must i use the ooo-classes, direct (OfficePath\program\classes) or indirect (my extern dir, lib path).

Last word to the SDK, it´was great but in the reason that can´t help me, or my knowledge was to small for this ?! :( / ;-|



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
.......... Zühlke IT GbR ............
Informationstechnologien Training - Entwicklung - Support ..................................... Erik Zühlke Catharina-Fellendorf-Straße 105
      D - 21035 Hamburg
   Tel.: +49 40 735 97 799
   Fax.: +49 40 735 97 798
   Mail: [EMAIL PROTECTED]
.....................................


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to