Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Testing applets

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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'm not sure if I approve of this interruption. But this tiny ad checks out:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic