ProcessBuilder and Process.waitFor(), how long does it wait?

前端 未结 3 836
闹比i
闹比i 2020-12-16 16:00

I am executing an .exe-file from java, using the ProcessBuilder class and the Process class. To explain what I am doing:

 builder = new ProcessBuilder(comman         


        
3条回答
  •  半阙折子戏
    2020-12-16 16:27

    Additionally, If there are outputs in the "commands". you should read the standard output and standard error output by stream(process.getErrorStream()) and process.getInputStream()).If not and output or error output be full, the waitfor() would be hanged.

提交回复
热议问题