随笔-2  评论-0  文章-6  trackbacks-0
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()
posted on 2006-12-02 11:57 世界上最牛的人! 阅读(138) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: