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

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

          BlogJava 首頁 新隨筆 聯(lián)系 聚合 管理
            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類網(wǎng)絡(luò)技術(shù)

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


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 阿城市| 盈江县| 华亭县| 基隆市| 黄陵县| 玉树县| 广德县| 新绛县| 台南市| 囊谦县| 扎兰屯市| 昌江| 郯城县| 岐山县| 广平县| 平昌县| 科尔| 梅河口市| 洪湖市| 从化市| 广南县| 瓮安县| 梅州市| 麻江县| 阆中市| 沂南县| 龙泉市| 乐亭县| 图们市| 锡林郭勒盟| 宜宾市| 秭归县| 肥乡县| 香格里拉县| 连州市| 西乌珠穆沁旗| 青州市| 北辰区| 郧西县| 秦安县| 马鞍山市|