Runtime run = Runtime.getRuntime();
Process pro = null;
try{
pro = run.exec("C:\\Program Files\\Tencent\\QQ\\QQProtect\\Bin\\QQProtect.exe");
}catch(Exception e){
e.printStackTrace();
}finally{
if(pro != null){
pro.destroy();
pro = null;//释放资源
}
}
Process pro = null;
try{
pro = run.exec("C:\\Program Files\\Tencent\\QQ\\QQProtect\\Bin\\QQProtect.exe");
}catch(Exception e){
e.printStackTrace();
}finally{
if(pro != null){
pro.destroy();
pro = null;//释放资源
}
}