• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Restrict access of an applet to classes in a package

 
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
Saloon Keeper
Posts: 11021
12
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.*";
};
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic