Get process output without blocking

前端 未结 2 2081
粉色の甜心
粉色の甜心 2021-01-22 08:14

I want to get a process\' output (Git.exe to be exact) and convert it to a String object. Previously sometimes my code was blocked. Then I figured out that it\'s be

2条回答
  •  甜味超标
    2021-01-22 08:56

    Use ProcessBuilder or Apache commons-exec.

    Your posted code has bugs, this is a hard topic to get right.

提交回复
热议问题