1

나는 몇 가지 문제가 내 서명 웹 애플릿을 실행하는 데 문제가java.security.AccessControlException : ("java.util.PropertyPermission에" "jna.boot.library.path", "읽기") 액세스가 거부

이 잘 실행

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이 문제를 해결할 수 있습니까? 정책 파일 수정 이외의 다른 옵션은 무엇입니까?

+0

* "AccessController.doPrivileged를 사용하면 문제를 해결할 수 있습니까?"* 가능성이 있지만 해당 메소드가 JS에서 호출되는 신뢰할 수있는 애플릿 인 경우에만 가능합니다. 그렇지 않으면 사용자가 신뢰 프롬프트를 확인하자마자이를 신뢰할 수 있어야합니다. –

답변

1

필자가 가진 문제는 참조 된 Jar 파일 (주 Jar 외부)이 서명되지 않았기 때문에 서명 한 후 문제가 없어 졌다는 것입니다.