win64位系统 java.policy

java applet访问时报错

java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:8080 connect,resolve)

 

可如下解决:

 

一、文件位置

C:\Program Files (x86)\Java\jre6\lib\security\java.policy

C:\Program Files\Java\jre6\lib\security\java.policy

C:\Program Files\Java\jdk1.6.0_31\jre\lib\security\java.policy

 

二、在grant {}里增加两句

 permission java.net.SocketPermission "127.0.0.1:8080", "connect,resolve";
 permission java.net.SocketPermission "localhost:8080", "connect,resolve";

 

三、重启eclipse及tomcat(非常重要)

        重新登录程序

你可能感兴趣的:(java,eclipse,tomcat,Security,Access,applet)