You don't say which OS you're using. Assuming your find
command syntax is correct (it's not correct on Mac OSX), I think you should be:
- consuming both stdout and stderr. You need to do this concurrently to avoid blocking behaviour. See this SO answer for more details
- collecting the exit code from the spawned process via
Process.waitFor()
Brian Agnew
2010-09-18 15:41:36