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

后端 未结 10 1173

I have a Java Applet inserted on a simple HTML page located at http://localhost:8080/index.html:



        
      
      
      
10条回答
  •  囚心锁ツ
    2020-12-03 09:17

    I encountered the same problem after installing Java 6 Update 22. My applet has been online for several years with no reported errors. When I downgrade to version 6 Update 21, everything works perfect. My applet is not signed.

    SOLUTION: It took me ha while to find the cause of the problem. Actually in my case there were several factors causing the security error. The problem was solved by the crossdomain.xml file. The Java applet tried to download the crossdomain file, failed, and did not even bother to display an error in the java console (debug level 5). Java tried to download the file from the ip adress of my domain (http://ip-address/crossdomain.xml), and not the root of my website (http://domain-name/crossdomain.xml). I guess it is better for the security aspect? I then had to configure the webserver to expose the crossdomainfile on the IP address. In my case I have removed the default website in ISS for security reasons, and had to create a new website. I then discovered that the java applet did not work with the crossdomain files i use with flash:

    
    
       
       
       
    
    

    I had to remove the site-control and allow-http-request-headers-from nodes from the xml file in order to make the applet work.

提交回复
热议问题