I need an applet to open the socket and communicate with the server listening on the local host to which the applet is loaded (end-user machine).
contrary to what I read about applet security, it seems that even signed applets cannot open the socket to another host from which they were downloaded (it works fine on the same computer)
I certified the applet using -selfcert, signed it using jarsigner, and yet, when it tries to open the socket to another host, I get:
Java.lang.Exception: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:9999 connect,resolve)
I even tried changing the Java policy file, although this is not required with signed applets:
grant codeBase "http://applethost:8080/socket" { permission java.security.AllPermission; permission java.lang.RuntimePermission "usePolicy"; };
What is a deal with sigend applets, can they connect to another host or not?
source share