Problems getting started! - bootstrapper connection problem

The Application Programming Interface and the OASIS Open Document Format

Problems getting started! - bootstrapper connection problem

Postby gringogordo » Wed Apr 08, 2015 12:19 am

I'm trying to understand how to use the open office api / uno to open open office documents. I have installed the latest version of Open Office (4.1.1) onto Windows 7. I am using Java in Eclipse.

I have found a couple tutorials and Q & A's to do this and have fallen at the first hurdle.

I have added juh.far, jurt.jar, ridl.jar, unoil.jar in "C:\Program Files (x86)\OpenOffice 4\program\classes" to the build path and tried to run some basic code to connect

Code: Select all   Expand viewCollapse view
// Get the remote office component context
XComponentContext xContext = Bootstrap.bootstrap();

Doing this I got an error "no office executable found" as warned in the article. I tried adding the program folder to the build path although this seemed like the wrong thing to do (?) and it made no difference.

Googling this I found various articles along similar lines to this - ... php?t=2520.

And so I added the bootstrapconnector.jar file (looks like an old file ?)to the classes folder and added it to the build path and altered the code to

Code: Select all   Expand viewCollapse view
(import ooo.connector.BootstrapSocketConnector;)

String oooExeFolder = "C:/Program Files (x86)/OpenOffice 4/program/";
XComponentContext xContext = BootstrapSocketConnector.bootstrap(oooExeFolder);

This now gives me a different error

exception is java.lang.NoClassDefFoundError: ooo/connector/BootstrapSocketConnector...

java.lang.ClassNotFoundException: ooo.connector.BootstrapSocketConnector...

Have I gone the wrong way or is this just a silly error (one thing that worries me is the import

import ooo.connector.BootstrapSocketConnector; is very different to the rest that I was using (or would like to use if I could get that far which all start


Can anyone help ?!
Open Office 4.1 API
Posts: 6
Joined: Fri Apr 03, 2015 6:44 pm

Return to UNO API and ODF

Who is online

Users browsing this forum: No registered users and 0 guests