Runtime rt = Runtime.getRuntime();
String adsl = "C:\\Program Files\\ChinaNet\\VnetClient.exe "
Process proc = rt.exec(adsl);//执行拨号程序
Thread.sleep(18000);
Process proc1 =rt.exec( "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE ");//自动打开ie
Thread.sleep(5000);
proc1.destroy();//关闭IE
proc.destroy(); //关闭ADSL拨号程序
其中ie是可以关掉,但是ADSL拨号程序却关不掉,请大侠指点,谢谢!
------解决方案--------------------
Process.destroy() 杀掉子进程~对于该进程启动的别的进程,他不知道也无法进行KILL
------解决方案--------------------
up
------解决方案--------------------
可以exit么?
------解决方案--------------------
去下载pskill
rt.exec( "pskill VnetClient ");//来删除