Client can use JNI, retrieve the MAC addr, then send to the server
请问:javamap(),得到mac地址的方法是怎样的。能写几行吗?多谢!
The easiest way is to run "ipconfig /all" from Java (use Runtime.exec()), then get output from it, then try to parse the output.Don't blame me if the following code doesn't compile:Process p = Runtime.exec("cmd ipconfig /all"); InputStream strm = p.getInputStream(); //from strm, you can readline(), then look for "Physical Address"
能在用户通过Browse登录时获取?
好像想歪了吧
呵呵,个人意见
多谢!!
实际上除非对方和你在同一网络内,否则根本就不可能,因为在底层传输中,跨网络的包中应该是没有
包含mac地址这个信息的,只有源IP地址和目标IP地址
O ,O ,O
Only you ,can tell me the MAC!
那我想知道用java如何得到本地的mac地址呢?
InputStream strm = p.getInputStream();
//from strm, you can readline(), then look for "Physical Address"
但是我不懂JAVA
不知道JAVA可以调C吗?
如果行,
就好办了