Welcome![Sign In][Sign Up]
Location:
Search - how to get network card name using java code

Search list

[JSP/JavaJAVAMAC

Description: JAVA得到网卡物理地址(windows和Linux) ,当时觉得挺好,后来正好项目里有需要,就用了它,但好像有点问题.因为它是采用固定字符串搜索(if (line.indexOf("Physical Address") != -1) )获得MAC 地址的,后来在应用时出了问题,因为没有"Physical Address"这一项.后来在外网在查查了一下,后来发现老外有写一个这样的类,可能那样的方式更加可靠一点.算是做个标记-JAVA get the physical address of network card (windows and Linux), then feel good, then just need to have projects, we used it, but it seems rather questionable. Because it is the fixed-string search (if (line.indexOf (Physical Address )! =-1)) to obtain MAC address, then the application of a problem, because there is no Physical Address this item. then check out network, then later discovered that a foreigner has to write such a category, you may like A LITTLE more reliable way. is to be a marker
Platform: | Size: 23552 | Author: cb | Hits:

CodeBus www.codebus.net