Apache OpenOffice (AOO) Bugzilla – Issue 123421
OOoBean blocking Writer on closing
Last modified: 2014-05-30 09:12:28 UTC
I have a Java application which uses the OOoBean internally. When the application starts it also tries to open office.exe. [code] String path = System.getenv("UNO_PATH"); path = path.replace('\\', '/'); String commandLine = "\"" + path + "/soffice\" -nodefault -norestore -nocrashreport -nolockcheck -nologo -accept=" + interProcCommunicationString + ";urp;StarOffice.ServiceManager"; Runtime.getRuntime().exec(commandLine); [/code] I can open and close the Writer as usual parallel to the Java application. In the next step the Java application opens the Writer internally and creates and shows an empty document. The OOoBean connects whith the office.exe. oBean.startOOoConnection("uno:" + interProcCommunicationString + ";urp;StarOffice.ServiceManager"); I can open and close the Writer as usual parallel to the Java application here, too. But if I now close the part of the program using the empty office document I can never get the Writer, which is running at the same time, to close. I can get it to open, but not to close. It doesn´t matter if I call stopOOoConnection or terminate desktop. this.oBean.getOOoDesktop().terminate(); this.oBean.stopOOoConnection(); From my understanding of Open Office it must have something to do with XTerminateListener and TeminateVetoException. I haven´t figured out how it should work. Especially because it works when the OOoBean hasn´t done anything yet and when it is showing the empty Office document.