wood burning stoves
The moose likes Applets and the fly likes Testing applets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Testing applets" Watch "Testing applets" New topic

Testing applets

Drew Chamberlain

Joined: Dec 08, 2008
Posts: 2
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.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Welcome to JavaRanch.

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.
Drew Chamberlain

Joined: Dec 08, 2008
Posts: 2
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.
I agree. Here's the link: http://aspose.com/file-tools
subject: Testing applets
It's not a secret anymore!