OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Java - swriter.exe (wait for the process to be ended) how?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Code Snippets
View previous topic :: View next topic  
Author Message
peterv6i
General User
General User


Joined: 13 Jun 2005
Posts: 36

PostPosted: Fri Nov 18, 2011 12:01 am    Post subject: Java - swriter.exe (wait for the process to be ended) how? Reply with quote

Hello,
I have a situation in Oracle Forms when I must invoke Open Office with some odt or sxw file from pluggable java component (oracle forms).

The problem is if the customer has openoffice "quick start" enabled in taks bar then the p.waitFor() is ignored... (it wan't wait for the process to be ended).

I must wait for the process to be ended because after the open office is closed i must upload changed sxw ord odt to my databse (dynamic reports with open office)..

What is the way to resolve this problem? (I must use jdk1.3! (Jinitiator engine))


The code to launch open office process..
Code:
public OpenOfficeProces() {
      System.out.println("Start");
      try {
         String line;
         Runtime r = Runtime.getRuntime();
         Process p = r.exec("C:/Program Files (x86)/OpenOffice.org 3/program/swriter.exe'");
         int x = p.waitFor();
         System.out.println("smo leti...Done." + x);
      } catch (Exception err) {
         err.printStackTrace();
      }
   }
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Code Snippets All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group