java打开后台程序
时间:2014-06-10 07:57:42
收藏:0
阅读:341
try{
String cmds="java -version";
Process p = Runtime.getRuntime().exec(cmds);
int exitValue = 1;
if((exitValue = p.waitFor()) != 0)
{
p.destroy();
System.out.println("exitValue:"+exitValue);
System.exit(exitValue);
}
}catch (IOException e) {
e.printStackTrace();
}catch (InterruptedException e) {
e.printStackTrace();
}
评论(0)