• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access Control Exception

 
Anthony O'Rourke
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sudarshan ramachandra
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
Anthony O'Rourke
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Vicente Barreiro
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm having exactly the same problems but reading audio clips using, I'm not using jar file either. Your comments are highly appreciated.
Vicente.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic