views:

48

answers:

1

Hello fellas!

My problem is: I want to start a process via a thread and that process should execute his job. As far as I started the process, he remains into memory and does nothing until I close my main program. (like it was some kind of suspended) And only after exiting main program, this process is starting to do what he must.

Did someone met that before?

A: 

The process is likely either waiting for input, or has filled its output buffer and needs you to empty it before it can continue. Take a look at Process.getInputStream(), Process.getOutputStream(), and Process.getErrorStream() for communicating with the process.

As a first step, you could try closing Process.getOutputStream() so it will stop waiting for you to provide input.

Jonathan