本文介绍了小程序不能访问NetworkInterface.getHardwareAddress()API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要求,其中我想读的客户端米的MAC地址/ C使用的小程序。

I have a requirement wherein I want to read the mac address of client m/c using an applet.

但一些谷歌上搜索后,我发现小程序在一个受保护的沙盒模式下运行,并且不能访问 NetworkInterface.getHardwareAddress() API。正因为如此,当小程序在浏览器那里我得到的mac地址当小程序在Eclipse运行运行,我没有得到MAC地址。

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.

请让我知道的方式,使小程序可以访问 NetworkInterface.getHardwareAddress() API

Please let me know way so that applet can get access to NetworkInterface.getHardwareAddress() api.

推荐答案

您需要授予所需的权限。请参见。

You need to grant the required permission. See here.

这篇关于小程序不能访问NetworkInterface.getHardwareAddress()API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 09:00