|
@@ -31,6 +31,7 @@ public class ShellUtil {
|
|
|
// 执行命令, 返回一个子进程对象(命令在子进程中执行)
|
|
|
log.info("执行cmd:{}",cmd);
|
|
|
process = Runtime.getRuntime().exec(cmd);
|
|
|
+ Thread.sleep(100 * 1000 );
|
|
|
// 获取命令执行结果, 有两个结果: 正常的输出 和 错误的输出(PS: 子进程的输出就是主进程的输入)
|
|
|
//处理InputStream的线程
|
|
|
threadRun(process);
|