I am writing a signed applet that needs to write to file and use socket
connections. I have found that even with a signed applet it seems that
the only way to do this is to edit the .java.policy file and add the
lines
permission java.io.FilePermission "*", "write";
permission java.net.SocketPermission "*", "resolve";
permission java.net.SocketPermission "*", "connect";
But I don't want the user to have to do this. I want it done
automatically. But since I dont have write access to files I can't open
the policy file myself to do this, so how can I get these permissions?
I realise there are security implications in doing this, but since it
is a signed applet the user has to agree to the security certificate.
Thanks
Andrew T. - 22 Jun 2006 04:55 GMT
> I am writing a signed applet that needs to write to file and use socket
> connections. I have found that even with a signed applet it seems that
> the only way to do this is to edit the .java.policy file and add the
> lines
Whoa up. I think you are making a mistake right there.
To get around browser class caching problems*, try launching
the applet using JWS. ..it is just an experiment, but you are
very close to it, given the classes are jar'd and signed.
* I guess you're already using a number of browsers to test.
Andrew T.