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 閱讀(738) 評論(0)  編輯  收藏 所屬分類: JAVA類網絡技術

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


          網站導航:
           
          主站蜘蛛池模板: 古交市| 宿州市| 中超| 工布江达县| 营口市| 博客| 固镇县| 黔南| 秭归县| 合阳县| 三河市| 牡丹江市| 越西县| 芒康县| 宁武县| 手游| 斗六市| 蓝田县| 乌鲁木齐县| 连江县| 海安县| 搜索| 筠连县| 吉安县| 邵武市| 鄂伦春自治旗| 瑞金市| 普兰店市| 武威市| 县级市| 滦平县| 开平市| 井陉县| 横峰县| 华亭县| 基隆市| 忻州市| 砀山县| 遂昌县| 滨州市| 沁阳市|