gpt4 book ai didi

java.security.AccessControlException : access denied ("java.util.PropertyPermission" "jna.boot.library.path" "read")

转载 作者:太空宇宙 更新时间:2023-11-04 07:41:00 24 4
gpt4 key购买 nike

我在运行我的签名网络小程序时遇到一些问题,

它在 Eclipse 中运行良好,但是当我上传到网页时,我收到以下错误日志:

Exception in thread "AWT-EventQueue-2" java.lang.ExceptionInInitializerError
at com.dermalog.imaging.capturing.cwrap.vc.DermalogvcLibrary.<clinit>(DermalogvcLibrary.java:30)
at com.dermalog.imaging.capturing.DeviceManager.<clinit>(DeviceManager.java:33)
at MyPackage.Bio.GetDevice(Bio.java:218)
at MyPackage.Bio.StartDevice(Bio.java:150)
at MyPackage.Bio.access$0(Bio.java:144)
at MyPackage.Bio$1.run(Bio.java:80)
at java.security.AccessController.doPrivileged(Native Method)
at MyPackage.Bio.<init>(Bio.java:76)
at MyPackage.Test$2.actionPerformed(Test.java:45)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied("java.util.PropertyPermission" "jna.boot.library.path" "read")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at com.sun.jna.Native.loadNativeLibrary(Native.java:650)
at com.sun.jna.Native.<clinit>(Native.java:109)
... 44 more

我认为这是突破沙箱并与计算机通信的问题。

使用AccessController.doPrivileged可以解决问题吗?除了修改策略文件之外,我还有哪些选择?

最佳答案

事实证明,我遇到的问题是我引用的 Jar 文件(在主 Jar 之外)没有签名,签名后问题就消失了。

关于java.security.AccessControlException : access denied ("java.util.PropertyPermission" "jna.boot.library.path" "read"),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16061100/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com