Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet to read text

 
Bahadir Mert Uzan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there Java Gurus

I am bombing you with questions but I need help

I read a text file using a class called scanner and then build objects using the information(Text is in the same folder with class files)
Then I build a various list to send it into my JPanel.
Then I build an JApplet that holds my panel, when I start the project it runs smoothly but when i put into an html page
scanning class causes an error and cant find the text file.
I understand that this is a security feature of applets but how can I get rid of it.
My applet simply adds panel which uses 4 other objects and swing feautures and nothing more.
Also the web page is just this


Thanks and more thanks if you can send me codes
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the file located? If it's on the client then you'll indeed need to sign the applet (see HowCanAnAppletReadFilesOnTheLocalFileSystem for details). If it's on the server -and it sounds more like that might be the case- then no signing is needed; see HelloServerFile for an example.
 
Bahadir Mert Uzan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for the details. I though i was doing that by using different classes. I had my own class that does the scanning but they couldn't do it. Instead I follow server method and let applet read the file and send it to scanner.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic