我有一个在java中使用ProcessBuilder运行的进程,它在命令行中运行一些命令。我得到以下输出:
Fetching data ...
Data successfully fetched.
An older version of Data already present on the System
1.Install the newer version
2.Keep the previous version
Please Type 1 to get the newer version or 2 to keep the older version
现在提取大约需要1秒钟。所以,我无法弄清楚如何在单个运行过程中输入命令行中的任何一个选项。