Detaching my java application from openoffice leaving it open
Posted on 2009-05-18
I'm facing the following problem: in my java application I need to open an openoffice calc spreadsheet, populate it with my data and then detach from OOo leaving the spreadsheet open on screen (this is mandatory, since the user expect to get an OOo calc open with certain data exported from my application, and then work with this data on calc).
I managed to get everything working (calc opens filled with data) but I don't understand how can I detach this calc window from my java app.
It seems that the communication bridge between java and OOo creates a new thread. When the user closes the java application, the JVM won't stop until all OOo instances are closed. I suspect that the java-OOo "bridge" live thread prevents the JVM to fully stop. Googling around the only way I found to detach is to stop OOo, but this is not what I want. OOo must stay open and fully detached from Java.
Any ideas? Thanks in advance.