I am trying to convert an application to an applet and want to test it easily inside eclipse. The problem is that when I run it, the generated java.policy.applet file grants all permissions. Any ideas on how to run the applet within eclipse (or any ide/appletviewer/etc, just not a fully deployed setup), but with the same permissions it would have in a sandboxed, web browser environment? I tried editing the java.policy.applet to grant no permissions, but it looks like that is too restrictive...
Any help or links to articles that would help me dig into this would be appreciated.
Why not test it in appletviewer? All you need is an HTML file with the applet tag (actually, the applet tag is all the file needs to contain). Browsers can also open local HTML file containing applets; they don't need to be served from somewhere.
Joined: Dec 08, 2008
Originally posted by Ulf Dittmer:
Why not test it in appletviewer?
OK, that helps. It looks like I misunderstood the errors I was getting to be an appletviewer issue, but it was an eclipse problem. When you debug in eclipse, it seems to be creating the security file, then running the appletviewer. When you just run the appletviewer, it will run with the proper rights. I will look into a way to configure eclipse or just run the appletviewer. Thanks.