int read; //實現ping命令
???????????????? try {??????????? Process ps = Runtime.getRuntime().exec("ping 127.0.0.1");??????
????? InputStream is = ps.getInputStream();????????
??? while ( (read = is.read()) != -1) {??????????????
? System.out.print( (char) read);??????????
? }?????????????
??? }??????????????
?? catch (IOException ex) {?????????
?? ex.printStackTrace();????????????????
????? ?}???????????
try { //用ie打開網頁??????????
? String str = "E:\\java-api\\index.html";??????
????? Runtime.getRuntime()