I need an applet to open a socket and communicate with a server listening on the local host to which the applet downloaded (the end user machine).
contrary to what I have read about applet security, it seems that even signed applets cannot open a socket to a different host from which they were downloaded (on the same machine it works perfectly)
I have certified the applet using -selfcert, signed it using jarsigner, and still, whenever it tries to open a socket to a different 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 with signed applets it is not required to do so:
grant codeBase "http://applethost:8080/socket" {
permission java.security.AllPermission;
permission java.lang.RuntimePermission "usePolicy";
};
What is the deal with sigend applets, can they connet to a different host or not?