How can I unblock from a Java started process?

前端 未结 8 1215
旧巷少年郎
旧巷少年郎 2021-01-29 01:27

When executing some command(let\'s say \'x\') from cmd line, I get the following message: \"....Press any key to continue . . .\". So it waits for user input to unblock.

8条回答
  •  误落风尘
    2021-01-29 02:07

    The program doesn't continue because it is blocked expecting input from the user.

    An option is to launch the outer process in a separate thread, or use threads sharing the Process p in order to be able to write to its stream.

提交回复
热议问题