62,614
社区成员
发帖
与我相关
我的任务
分享
try {
String commons[] = {"D:\\a.exe" ,"D:\\data\\aa.doc","-p","D:\\data\\bb.doc"};
Process child = Runtime.getRuntime().exec(commons);
BufferedReader buf = new BufferedReader(new InputStreamReader(child.getErrorStream()));
String str = "";
while((str = buf.readLine())!= null)
{
System.out.println(str);
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Runtime.exec("d:/a.exe inputfiel -p outputfile");