We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

SDK API bootstrap call after xDesktop.terminate() [closed]

asked 2016-09-28 15:34:38 +0200

lgs gravatar image

updated 2020-08-10 00:39:15 +0200

Alex Kemp gravatar image

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


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

exception. Any ideas what am I doing wrong?

Regards, lgs

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-08-10 00:39:31.924728

1 Answer

Sort by » oldest newest most voted

answered 2016-09-29 12:58:50 +0200

lgs gravatar image

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.



edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-09-28 15:34:38 +0200

Seen: 336 times

Last updated: Sep 29 '16