62,614
社区成员
发帖
与我相关
我的任务
分享
try
{
Process child=Runtime.getRuntime().exec("cmd.exe /c start "+batFileName);
InputStream in=child.getInputStream();
int c=0;
while(c!=-1)
{
c=in.read();
}
in.close();
try
{
child.waitFor();
}
catch (InterruptedException e)
{
e.printStackTrace();
}
System.out.println(batFileName+" done");
}
catch (IOException e)
{
e.printStackTrace();
}
InputStream in=child.getInputStream();
int c=0;
while(c!=-1)
{
c=in.read();
}
in.close();