I tried something like this:
try {
Process p = Runtime.getRuntime().exec("somepathto\
\some.exe");
String line = null;
BufferedReader read = new BufferedReader(new
InputStreamReader(p.getInputStream()));
while((line = read.readLine()) != null) {
System.out.println(line);
}
int exitVal = p.waitFor();
System.out.println("Exit value = " + exitVal);
}
catch (Throwable e) {
e.printStackTrace();
}
...but it doesn't work.
When I try to read one by one character (using read() method) it
produces some output, but not all.
Can anyone help me? Thanks in advance. :)
Roedy Green - 10 Jan 2008 14:49 GMT
On Thu, 10 Jan 2008 05:42:52 -0800 (PST), Ivan S
<ivan.skugor@gmail.com> wrote, quoted or indirectly quoted someone who
said :
> while((line = read.readLine()) != null) {
> System.out.println(line);
see http://mindprod.com/jgloss/exec.html for how to do it.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Jacek Wojciechowski - 10 Jan 2008 15:35 GMT
> Can anyone help me? Thanks in advance. :)
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=1

Signature
Pozdrawiam,
J.W.