views:

38

answers:

2

Hi all, I need some genius advice on this one.

I have a Java Swing application that needs to launch a word processor in order to allow the user to complete some work, and then retrieve the output of that work and evaluate it later.

In my head I am thinking my application can look in the normal places for Open Office or Word executables to see if one of those programs is installed, and then create a process and block the Swing window until that process returns. Is this really the best way to go? Also, how can I pass data back and forth?

I looked into the Open office java bean already, but alas I do not think there is Mac/Linux support.

So, to sum up my question:

  • is creating a process for the word processor the best way to do this?
  • how can I pass info between my app and the word processor (more specifically, when they have finished creating their document, how can the Swing app get it)

Thanks,

Ben

+2  A: 

Use the open office sdk, which is available for Linux. You might want to use open office in server mode.

McPudding
Checking the documentation, this looks quite promising. Can you explain a bit more about server mode? I haven't come across this option yet in my admittedly limited reading of the documentation.+1
bgould
http://doc.nuxeo.org/5.3/books/nuxeo-book/html/admin-openoffice.html
McPudding
Ahh, ok. I actually need the UI for my app. After reading the docs, I'm pretty sure that the OpenOffice.org SDK is the right answer.
bgould
A: 

You could integrate docx4all (Swing based docx word processor) into your app.

plutext