这样的警告框,选择了“始壳允许applet访问打印机”在下次点击打印按钮时还是出现这样的警告框。现在也没有好的方案,现在想到是修改客户端JRE中的配置:
1. 找到客户端安装的JRE,一般默认安装的C:\Program Files\Java(现系统使用jre1.6)。
2. 找到jre1.6.0\lib\security文件夹下面的java.policy的文件。使用写字板打开文件如下:(红色字为添加的内容)
// Standard extensions get all permissions by default
grant codeBase "file:${{java.ext.dirs}}/*" {
permission java.security.AllPermission;
};
// default permissions granted to all domains
grant {
………………………………………………………………………………………
permission java.net.SocketPermission "localhost:1024-", "listen";
// "standard" properies that can be read by anyone
permission java.security.AllPermission;
permission java.util.PropertyPermission "java.version", "read";
permission java.util.PropertyPermission "java.vendor", "read";
permission java.util.PropertyPermission "java.vendor.url", "read";
permission java.util.PropertyPermission "java.class.version", "read";
………………………………………………………………………………………
};