I'm trying to launch a DOS application from a Java program in a Windows ME
environment, using for this purpose the method Runtime.exec(String command,
String[] envp,Java.io.File dir).
I put this instruction in a separated thread and built two
BufferedStreamReader objects to read data from the DOS command's output and
error stream. I access these steams by the Process.getInputStream() and
Process.getOutputStream() methods of the Process object returned by
Runtime.exec.
I meant to read these stream continuosly until the DOS command came to an
end.
Unfortunately, the thread which contains the Runtime.exec call locks at that
method call, and it SEEMS to happen if the content of one of these two
streams exceeds the length of some hundreds of bytes.
If I terminate that DOS process from Windows, the thread unblocks normally,
but the content of the streams exceeding the "critic" length is lost.
Can anyone help me?
I will post the code if you are interested.
Thanks in advance,
Daniele Simonelli