Contact me sending an e-mail (antispam defense activated) |
Title: The correct way to use process.waitFor() method Author: Sandro Tosi Last modified: 2005-02-06 The correct way to use the process.waitFor() method is described in http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html and substantially is this: 1. use thread to launch a program 2. process output of that process (Runtime.exec() has a limitated buffer size: once it's full the Java process hangs) 3. after processing the output, finally execute process.waitFor() |