SDK API bootstrap call after xDesktop.terminate()

Hi all,

I am trying to re-connect to libreoffice after a call to xDesktop.terminate() or BootstrapConnector.disconnect():

BootstrapSocketConnector bootstrapSocketConnector = new BootstrapSocketConnector(OOOEXEFOLDER);

XComponentContext xContext = bootstrapSocketConnector.connect();
        XMultiComponentFactory xRemoteServiceManager = xContext.getServiceManager();
Object desktop = xRemoteServiceManager.createInstanceWithContext(
                "com.sun.star.frame.Desktop", xContext);

XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, desktop);
......
......
xDesktop.terminate(); //or bootstrapSocketConnector.disconnect()

and then:

xContext = bootstrapSocketConnector.connect();

Then, whatever I try to do with xDesktop, xContext I keep getting an

com.sun.star.lang.DisposedException: java_remote_bridge com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge

or

java.io.IOException: EOF reached - socket,host=localhost,port=8100,localHost=127.0.0.1,localPort=63519,peerHost=localhost,peerPort=8100

exception. Any ideas what am I doing wrong?

Regards,
lgs

Hi all,

the reason seems to be that I had a 32-bit libreoffice installation on a 64-bit machine. I installed 64-bit libreoffice (and sdk) and it works.

Regards

lgs