Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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

Search Applet

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All!
I've written an applet to search through a phone list (text file). Originally this was written in Swing but I had problems with it being seen through web browsers. For firewall reasons, I decided to re-write the applet using AWT (instead of using Plug ins), but I am encountering the same problems. Basically, the applet is displayed, but when you click on search nothing happens. The error message starts as follows: access denied ( PhoneList.txt read)
I think that the problem is when it tries to read the text file of phone numbers.
The relevant piece of code is below:
public static Object[][] objectArrayFiller()
FileReader reader = new FileReader("PhoneList.txt");
nextChar =;
Am I trying to read the text file incorrctly? Is there a problem with doing this with an applet? I would be grateful of any advice or suggestions that anyone could give.
Many thanks,
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to your code, you're trying to read from the local file system. If that's the case, you need to sign the applet first. If not, you need to access the file on the server, but you need to access it as a resource rather than the way you have coded.
    Bookmark Topic Watch Topic
  • New Topic