Tuesday, May 15, 2001 06:42 AM
I am trying to run unix operating system command or shell script within my java program and get the stdout displayed into my textArea. It works fine. The problem I am having is I don't get anything show up on my textArea until all the output is ready. In other words, if the output lasts two minutes, and if I send the output to Systen.out.println(s) I get the output line by line, the way I want it, but if I try to get it into my textArea I have to wait for two minutes, and I get all output at once.
Here is my code
Process p = Runtime.getRuntime().exec(l);
BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));
while ((s = stdInput.readLine()) != null)
Re: Inserting stdout into textArea
Wednesday, September 12, 2001 02:09 PM