Ask Your Question
0

SDK API bootstrap call after xDesktop.terminate()

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

lgs 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

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

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

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.

Regards

lgs

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 254 times

Last updated: Sep 29 '16