Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Applet can't load gif image

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,
I am sure this must be in a FAQ somewhere but I did a search here and though this question has been asked once, there has been no 'solution'.
I have been writing a java application (which runs fine) and decided to convert it into an applet but ran into file reading problems. I am trying to simply load a 'gif' image but I get the following error when I try to load the applet: access denied ( someimage.gif read)
The class, 'gif' file and html page are all in the same directory. I get the same error loading the applet from a local directory or a server, using absolute or relative URL. I get the error even if I use a jar file.
Here is the line that tries to read the gif file:
ImageIcon cardImage = new ImageIcon("someimage.gif");
[ February 07, 2002: Message edited by: kurnaf ]
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kurnaf,
Look at the following link. It seems to be a fix for your exact problem.
NOTE: Your chosen name is not a valid user name here at the Ranch. We require a first name + space + last name so we can keep a professional atmosphere. Please read the naming convention here.
Kurnaf Naem
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Manfred for the pointer.
Sorry about the choice of nicks. Didn't pay attention to the fine print.
The first person to drink cow's milk. That started off as a dare from this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic