UnsatisfiedLinkError“访问被拒绝”即使完全控制
我从 java.lang.ClassLoader$NativeLibrary.load() 收到 java.lang.UnsatisfiedLinkError ,并显示消息“访问被拒绝”。 DLL 正在通过 UNC 路径从网络共享加载。它以前在其他网络共享上运行时没有错误(系统管理员告诉我,这个特定的共享更“本地 Windows”),所以我的第一直觉是使用 cacls 为每个人和每个人授予对 DLL 文件的完全控制权。运行Java代码的特定用户。当我在 Windows 资源管理器中查看 DLL 属性时,它显然已设置了这些权限,但仍然因此错误而失败。有什么想法吗?
I'm getting a java.lang.UnsatisfiedLinkError from java.lang.ClassLoader$NativeLibrary.load() with the message "Access is denied". The DLL is being loaded from a network share via a UNC path. It previously worked without error on other network shares (I have been told by a sysadmin that this particular share is more "natively Windows"), so my first instinct was to use cacls to grant Full Control on the DLL file both for Everyone and the specific user running the Java code. When I view the DLL Properties in Windows Explorer, it clearly has those permissions set, and yet it is still failing with this error. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一种可能性是该 dll 反过来尝试加载其他未获得足够权限的 dll。
One possibility is that this dll is, in turn, trying to load other dlls, which have not been given sufficient permissions.
以系统管理员身份运行它,它肯定会工作。我也遇到了同样的问题,并以管理员身份运行 Eclipse,结果成功了。
Run it as System Administrator and it will work for sure. I had a same problem and ran the Eclipse as Administrator and it worked.