Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Restrict access of an applet to classes in a package  RSS feed

 
Felix Sima
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

I'm new to applets and security and I've received the task to restrict an applet to use any other class except the classes in package "mypackage".
Can you give me some hints of how to do this (i didn't find anything helpful using google) . It is possible to do this by modifying only java.policy file?

Thanks in advance.

Bye,
Felix
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will have to elaborate on "restrict an applet to use any other class except the classes in package "mypackage"
What is restrict? Not use? As in when you code? Anything else?
 
Felix Sima
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

I've found the answer, thanks.

grant codeBase "file:${jboss.home}/server/default/deploy/<path to my jars>/-" {
permission java.lang.RuntimePermission "accessClassInPackage.mypackage";
permission java.lang.RuntimePermission "accessClassInPackage.mypackage.*";
};
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!