请问:如何用java程序调用批处理文件?
谢谢!
我的批处理命令是:
@echo off
jar cfm OneLib.jar manifest.jad jit/
@echo on
@echo Success
调用程序是:
Runtime.getRuntime().exec(
"C:/Program Files/Internet Explorer/iexplore.exe");
Process ps = Runtime.getRuntime().exec("D:/Package.bat");
System.out.println(loadStream(ps.getInputStream())); //load the stream
System.out.println(loadStream(ps.getErrorStream())); //load the stream
IE能运行,但不能产生JAR包