随笔-86  评论-33  文章-0  trackbacks-0
     Runtime ru = Runtime.getRuntime();
        try {
            //调用播放器文件播放指定MP3
            Process p1 = ru.exec("C:\\Program Files\\Windows Media Player\\wmplayer d:\\DADA\\mp3\\0197.mp3");
           //调用批处理文件 
            Process p2 = ru.exec("d:\\a.bat");

            //显示执行结果
            BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
            String line;
            while((line=br.readLine())!=null){
                System.out.println(line);
            }
        } catch (IOException ex) {ex.printStackTrace();}
posted on 2006-05-11 13:27 Derek.Guo 阅读(997) 评论(0)  编辑  收藏 所属分类: Java

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


网站导航:
 
MSN:envoydada@hotmail.com QQ:34935442