[英]UnsatisfiedLinkError “Access is denied” even with Full Control
I'm getting a java.lang.UnsatisfiedLinkError from java.lang.ClassLoader$NativeLibrary.load() with the message "Access is denied". 我从java.lang.ClassLoader $ NativeLibrary.load()获取java.lang.UnsatisfiedLinkError,并显示消息“Access is denied”。 The DLL is being loaded from a network share via a UNC path. DLL通过UNC路径从网络共享加载。 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. 它以前在其他网络共享上没有错误地工作(系统管理员告诉我这个特定的共享更像是“原生Windows”),所以我的第一直觉是使用cacls为每个人和特定用户运行Java代码。 When I view the DLL Properties in Windows Explorer, it clearly has those permissions set, and yet it is still failing with this error. 当我在Windows资源管理器中查看DLL属性时,它显然已设置了这些权限,但它仍然因此错误而失败。 Any ideas? 有任何想法吗?
一种可能性是,这个dll反过来试图加载其他没有获得足够权限的dll。
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. 我遇到了同样的问题并以管理员身份运行Eclipse,但它确实有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.