常规调用方式:(这个肯定会弹一下黑框)
Runtime.getRuntime().exec("cmd /c start XXX.bat");
解决不弹框只需要“start”后面加一个参数“/b”就行:
Runtime.getRuntime().exec("cmd /c start /b XXX.bat");
其他什么@echo off都是浮云。
Runtime.getRuntime().exec("cmd /c start XXX.bat");
解决不弹框只需要“start”后面加一个参数“/b”就行:
Runtime.getRuntime().exec("cmd /c start /b XXX.bat");
其他什么@echo off都是浮云。
转载于:https://my.oschina.net/9199771/blog/3082881