问题
I have a requirement wherein I want to read the mac address of client m/c using an applet.
But after some googling I found that applets run in a protected sandbox mode and can't have access to NetworkInterface.getHardwareAddress()
api. And because of that I am not getting mac address when applet runs in browser where as i get the mac address when applet runs from Eclipse.
Please let me know way so that applet can get access to NetworkInterface.getHardwareAddress()
api.
回答1:
You need to grant the required permission. See here.
来源:https://stackoverflow.com/questions/4525013/applet-not-able-to-access-networkinterface-gethardwareaddress-api