我在尝试从加载到IE10的applet中读取dll时收到以下错误:
access denied (java.lang.RuntimePermission loadLibrary.ReadRegistry)
这是1.6环境(这是一台客户端计算机,因此目前无法升级到1.7)。
导致错误的代码如下所示。在过去,我通过更改策略文件解决了这个问题。但这是一个签名的罐子。是否对签名的jar有限制,例如,您无法从签名的jar中读取系统库,仍然需要更改java策略文件?
----------------导致问题的代码--------------------------- ---------------
访问被拒绝(java.lang.RuntimePermission loadLibrary.ReadRegistry。
以下是导致错误的代码:
try {
System.loadLibrary("ReadRegistry");
} catch (SecurityException se) {
System.out.println("security error ->" + se.getMessage());
JOptionPane
.showMessageDialog(
applet.messageLine,
"<html> Security Error when loading ReadRegistry.dll. <BR> You are unable to access the 3M system at this time.</html>",
"Java load Library", 0);
applet.closeEncoder();
return;
}
答案 0 :(得分:0)