Hi, Description: I start manually LibreOffice Writer to edit a document. Then, I run a java application. It starts soffice calling the method BootstrapSocketConnector.connect(). The requests to soffice are well processed (odt to pdf exports). When I stop the java application, it calls xDesktop.terminate(). Actual result: xDesktop.terminate() stops all the instances of soffice including the one I started manually. Expected result: The only soffice instance to be stopped should be the one started by the java application. Reproducible: Always Is it an issue? How can I fix it in my java code in order to stop only the instance started by the java application ? Thanks, Gerard
This is not a bug. LibreOffice is designed to only run one instance of the application using a given user profile. So if you do not specify to use a separate profile when you call it from your application, it uses the existing running process. Calling terminate() then naturally terminates that single process. In order to have separate processes, use a separate user profile. That may be done using -env command line parameter when starting soffice [1]. Being unfamiliar with Java, and not seeing the specific code you use, I can't advise how to improve the code to specify the user profile there. However, I assume that question is a kind of "how do I", and is more suitable for https://ask.libreoffice.org/. [1] https://help.libreoffice.org/latest/en-US/text/shared/guide/start_parameters.html?DbPAR=SHARED
I get the expected result now. Thank you for your help!