• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Runtime.exec - multithread ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Runtime.exec - multithread ?


  • Subject: Runtime.exec - multithread ?
  • From: Erwin <email@hidden>
  • Date: Tue, 9 Nov 2004 09:08:54 +0100

In one of my components I launch (successfully..) a C-Program using Runtime.exec command-line to convert an Image
..........
try{
Process runningApp = Runtime.getRuntime().exec(command);
//
BufferedReader dtinstrm = new BufferedReader(new InputStreamReader(runningApp.getInputStream()) );
BufferedReader dterrstrm = new BufferedReader(new InputStreamReader(runningApp.getErrorStream()) );
runningApp.waitFor();
..........

Once it's finished, the image is stored into the file system, a DB is updated with the path to the converted image and an email is sent to the user.

As the conversion process takes some time (even in C), I wonder if it's possible to give hand back to the user (with a warning: you will get an email when the converted image will be ready for access)
In this case my component should not wait for the return code from the C program, but I don't know where and how I should manage this return code to perform the DB update and email sending.

Any track or tip on it ?

thanks a lot

Erwin
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Runtime.exec - multithread ?
      • From: Ben Ketteridge <email@hidden>
  • Prev by Date: Re: Getting the SQL while running from eclipse
  • Next by Date: Re: Runtime.exec - multithread ?
  • Previous by thread: Re: Getting the SQL while running from eclipse
  • Next by thread: Re: Runtime.exec - multithread ?
  • Index(es):
    • Date
    • Thread