DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Java (http://www.daniweb.com/forums/forum9.html)
-   -   JAVA Permission Blues.. :( (http://www.daniweb.com/forums/thread15703.html)

Trixie Dec 16th, 2004 9:28 pm
JAVA Permission Blues.. :(
 
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 :P 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!

jwenting Dec 17th, 2004 6:12 am
Re: JAVA Permission Blues.. :(
 
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.


All times are GMT -4. The time now is 3:55 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC