用java是无法从网卡读取数据的。

解决方案 »

  1.   

    用runtime执行,ipconfig/all后,读取dos窗口的内容,然后进行解析。
      

  2.   

    就象这样:
    Windows 2000 IP Configuration        Host Name . . . . . . . . . . . . : newman
            Primary DNS Suffix  . . . . . . . :
            Node Type . . . . . . . . . . . . : Broadcast
            IP Routing Enabled. . . . . . . . : No
            WINS Proxy Enabled. . . . . . . . : NoEthernet adapter 本地连接:        Connection-specific DNS Suffix  . :
            Description . . . . . . . . . . . : Realtek RTL8029(AS) PCI Ethernet Ada
    pter
            Physical Address. . . . . . . . . : 52-54-AB-4E-42-A1
            DHCP Enabled. . . . . . . . . . . : No
            IP Address. . . . . . . . . . . . : 10.126.9.139
            Subnet Mask . . . . . . . . . . . : 255.255.255.0
            Default Gateway . . . . . . . . . : 10.126.9.254
            DNS Servers . . . . . . . . . . . : 202.120.127.220