Have you tried not using the blocking I/O methods, i.e. any of the "waitFor..." ones?

Cheers,
_