File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

Testing applets

Drew Chamberlain
Greenhorn

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
Marshal

Joined: Mar 22, 2005
Posts: 42950
    
  71
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
Greenhorn

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