Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1158137
  • 博文数量: 56
  • 博客积分: 1682
  • 博客等级: 上尉
  • 技术积分: 719
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-21 17:29
文章分类
文章存档

2013年(1)

2012年(11)

2011年(44)

分类: Java

2011-08-10 16:16:41

1.在html中载入java applet时报异常policy...
可以在浏览器使用的jvm的jre(D:\Program Files\Java\jre6\lib\security\java.policy) 下添加如下内容:
permission java.security.AllPermission;
 //Add  SocketPermissions for each host that applets can connect to.
        //Use "*" to allow applets to connect to any host.
        permission java.net.SocketPermission "HOSTNAME1","connect,resolve";
        permission java.net.SocketPermission "mydomain.com","connect,resolve";
        permission java.net.SocketPermission "HOSTNAME3","connect,resolve";
 //Windows based systems use this line
        permission java.io.FilePermission "${java.home}\\lib\\security\\cacerts","read";
        //UNIX users comment out the previous line and uncomment the following
        permission java.io.FilePermission "${java.home}/lib/security/cacerts","read";

 //Shouldn't need to change anything below here.
 permission java.util.PropertyPermission "TN5250J_SSL_TYPE", "read,write";
 permission java.util.PropertyPermission "java.home","read";
    permission java.util.PropertyPermission "user.dir","read";
 permission java.util.PropertyPermission "file.seperator","read";
    // change the following to "read,write" if you want the user to be able to save
    permission java.io.FilePermission "TN5250JDefaults.props", "read";
 permission java.io.FilePermission "keymap","read,write";
 permission java.io.FilePermission "macros","read,write";
 permission java.io.FilePermission "scripts","read";
阅读(3044) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~