JAVA Runtime.getRuntime().exec 执行多条

中间加上 & 或者 && 就可以执行多条了.
Runtime.getRuntime().exec("cmd1 && " +
"cmd2 && " +
"cmd3 && " );

发布了137 篇原创文章 · 获赞 49 · 访问量 37万+

猜你喜欢

转载自blog.csdn.net/MAIMIHO/article/details/94035837
今日推荐