Hi, I have a problem loading a gif to an applet. It works fine in appletviewer, but when I try to view in the browser, I get the following message from the console: java.security.AccessControlException: access denied (java.io.FilePermission xxxxxx.gif read). This is the first of about twelve error messages. The gif file is in the same directory as the class and html file, and there are definitely no spelling or case errors. any ideas on how I can fix this? thanks in advance, Anthony PS. I'm not sure whether this should be in the swing section or in the applet section.
~~~~~~"Outside of a dog, a book is a man's best<BR>friend: and inside a dog, it's too dark to read."<P>- Groucho Marx~~~~~~~~~~~~~~
Hi Anthony, Please note that appletviewer overrides all security and that's why you are able to view your applet thru appletviewer. I am making some assumptions for your AccessControlExceptions. I assume you are not using a jar file. As I understand, there is a html converter available at the java site for you to convert your applets if you have used swing. This conversion becomes necessary to be able to view your applet in the browser. It helps if you could give the whole list of exceptions that is being thrown. Pl do revert back if you solve your problems. regards,
Joined: Dec 05, 2000
Hi sudarshan, Thank you for your reply. I am not using a jar file, I am trying to read the gif from the same directory as the .class file. I assume that this is what is causing the security exceptions. If I use a jar file will it change this?? I have not used jar files yet. thanks, Anthony.