pablo cesar aimar 巴勃羅·塞薩爾·艾瑪爾

          “窗寒西嶺千秋雪,門思東霧萬里床!”

          BlogJava 首頁 新隨筆 聯系 聚合 管理
            16 Posts :: 3 Stories :: 6 Comments :: 0 Trackbacks
          import java.io.*;

          public class Test {
              public static void main(String[] args) {
                  try {
                      Process process = Runtime.getRuntime().exec("ipconfig /all");
                      InputStreamReader ir = new InputStreamReader(process
                              .getInputStream());
                      LineNumberReader input = new LineNumberReader(ir);
                      String line;
                      while ((line = input.readLine()) != null)
                          if (line.indexOf("Physical Address") > 0) {
                              String MACAddr = line.substring(line.indexOf("-") - 2);
                              System.out.println("MAC address = [" + MACAddr + "]");
                          }
                  } catch (java.io.IOException e) {
                      System.err.println("IOException " + e.getMessage());
                  }
              }
          }
          posted on 2006-01-21 10:20 pablo cesar aimar 閱讀(732) 評論(0)  編輯  收藏 所屬分類: JAVA類 、網絡技術

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 尉氏县| 巴南区| 周口市| 阳春市| 中江县| 遂平县| 白玉县| 阳高县| 宁乡县| 凌源市| 广州市| 岗巴县| 贵德县| 平泉县| 达拉特旗| 南陵县| 海门市| 新昌县| 佛学| 南华县| 望谟县| 奉新县| 温宿县| 西和县| 新密市| 永和县| 和田市| 云和县| 临漳县| 广南县| 密云县| 揭西县| 武平县| 拜城县| 汾阳市| 扶绥县| 澎湖县| 铁岭市| 双辽市| 松江区| 闵行区|