Hi All,
I have some
java code that submits jobs to a utility running on Sun Solaris using the ProcessBuilder class of 1.5
The code is fairly simple. I am reading the error and output streams in separate threads too.
Now, my problem is that the utility, I am using, does not wait for the job to complete. Rather, it returns as soon as it submits the job(And returns the Pid of the process that is running the job).
This makes proc.waitFor() to return with 0 even though actually the job/process is still executing.
Any idea on how I can make Java wait for the actual process to finish?
Any help is appreciated.
Thanks,
Amber
[ October 26, 2007: Message edited by: Bear Bibeault ]