Get output of cmd command from java code

前端 未结 3 1251
甜味超标
甜味超标 2021-01-05 18:26

I have a program where I was able to successfully execute cmd commands from my code, but I want to be able to get the output from the cmd command. How can I do that?

3条回答
  •  星月不相逢
    2021-01-05 18:58

    look here: Extracting a process's exit code in the case of ThreadInterrupted

    You need to get the return code... you must wait for it.

提交回复
热议问题