JAVA Permission Blues.. :(

Reply

Join Date: Dec 2004
Posts: 1
Reputation: Trixie is an unknown quantity at this point 
Solved Threads: 0
Trixie Trixie is offline Offline
Newbie Poster

JAVA Permission Blues.. :(

 
0
  #1
Dec 16th, 2004
Hello all,

I have the following exception: java.security.AccessControlException: access denied (java.io.FilePermission blahblah.. myfile.gif read etc...

my code: JButton myButton = new JButton(new ImageIcon("myfile.gif"));

I added the ff to my java.policy file

grant codeBase "my domain-" {
permission java.security.AllPermission;
permission java.io.FilePermission "<<ALL FILES>>", "read, write";
};

No go

Did I miss something?

This is just a temporary thing, what I would like ideally is that my applet runs smoothly without having to change the java.policy file for every client How do I do that? I've read about signing applets, etc but I'd rather not do that.. is there any other way?

Thanks a lot!
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,145
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: JAVA Permission Blues.. :(

 
0
  #2
Dec 17th, 2004
The way you're doing it it won't work over a network anyway as you're trying to pull your graphics from the machine that's running the browser...

Pack everything in a jar file and pull the graphics from that.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC