Process output only becomes available after the process has finished

前端 未结 5 1324
死守一世寂寞
死守一世寂寞 2021-01-07 03:50

I have a Runnable that reads Console output from an externally called exe (see below) and writes it to both a log file and a JTextArea.

But my Runnable doesn\'t show

5条回答
  •  南方客
    南方客 (楼主)
    2021-01-07 04:09

    The problem in this case is with the waitFor:

    p.waitFor();
    

    This causes the Button Action Listener to wait on that point until the process is completed.

提交回复
热议问题