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
// Get the remote office component context
XComponentContext xContext = Bootstrap.bootstrap();
Googling this I found various articles along similar lines to this - viewtopic.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
(import ooo.connector.BootstrapSocketConnector;)
String oooExeFolder = "C:/Program Files (x86)/OpenOffice 4/program/";
XComponentContext xContext = BootstrapSocketConnector.bootstrap(oooExeFolder);
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
import com.sun.star.XXX
Can anyone help ?!