小程序无法访问 NetworkInterface.getHardwareAddress() api [英] Applet not able to access NetworkInterface.getHardwareAddress() api

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

问题描述

我有一个要求,我想使用小程序读取客户端 m/c 的 mac 地址.

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆