隨筆-204  評論-90  文章-8  trackbacks-0
          /**
          ?*?
          @author ?cnyqiao@hotmail.com
          ?*?@Date???Nov?22,?2006
          ?
          */

          import ?java.io. * ;

          public ? class ?compiler? {
          ????
          public ?compiler()? {
          ????}


          ????
          public ? static ? void ?main(String[]?args)? {
          ????????compiler?compiler1?
          = ? new ?compiler();
          ????????Runtime?runtime?
          = ?Runtime.getRuntime();
          ????????Process?process?
          = ? null ;
          ????????String?line?
          = ? null ;
          ????????InputStream?is?
          = ? null ;
          ????????InputStreamReader?isr?
          = ? null ;
          ????????BufferedReader?br?
          = ? null ;
          ????????
          try ? {
          ????????????process?
          = ?runtime.exec( " tail?-f?submit.2006-11-21.log " );? // ?關(guān)鍵是這行
          ????????}
          ? catch ?(IOException?e)? {
          ????????????System.out.println(e);
          ????????}

          ????????is?
          = ?process.getInputStream();
          ????????isr?
          = ? new ?InputStreamReader(is);
          ????????br?
          = ? new ?BufferedReader(isr);
          ????????
          try ? {
          ????????????
          while ?((line? = ?br.readLine())? != ? null )? {
          ????????????????System.out.println(line);
          ????????????}

          ????????}
          ? catch ?(IOException?e)? {
          ????????????System.out.println(e);
          ????????????e.printStackTrace();
          ????????}


          ????}

          }
          posted on 2006-11-22 15:09 一凡 閱讀(2333) 評論(0)  編輯  收藏 所屬分類: JAVA 基礎(chǔ)
          <2006年11月>
          2930311234
          567891011
          12131415161718
          19202122232425
          262728293012
          3456789

          常用鏈接

          留言簿(9)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          相冊

          學(xué)習(xí)資源

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 离岛区| 循化| 罗平县| 原阳县| 湖口县| 兖州市| 温宿县| 九江县| 周至县| 邳州市| 常熟市| 长泰县| 玉林市| 武威市| 乐亭县| 梨树县| 常熟市| 呼玛县| 元氏县| 顺平县| 和林格尔县| 邵武市| 宜兴市| 太白县| 龙山县| 扎鲁特旗| 大石桥市| 榆树市| 普宁市| 衡水市| 纳雍县| 黄山市| 改则县| 定远县| 会理县| 贡觉县| 东乡| 博野县| 门头沟区| 福建省| 武夷山市|