javaopenoffice.orgopenoffice-writer

No office executable found exception while connecting to OpenOffice through Java


Using XComponentContext xContext = Bootstrap.bootstrap(), I am trying to get the Get the remote office component context of OpenOffice through Java.But its raising exception no office executable found .

I have specified the path of program directory of OpenOffice in the CLASSPATH, yet i am getting this exception.How can I resolve this problem?


Solution

  • 1) Download the bootstrapconnector.jar from http://forum.openoffice.org/en/forum/download/file.php?id=836

    2) String oooExeFolder = "C:/Program Files/OpenOffice.org 2.3/program/";

    3) XComponentContext xContext = BootstrapSocketConnector.bootstrap(oooExeFolder);

    Sourced form check out http://forum.openoffice.org/en/forum/viewtopic.php?t=2520