wood burning stoves*
The moose likes Beginning Java and the fly likes HELP! reading a text file ************* Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "HELP! reading a text file *************" Watch "HELP! reading a text file *************" New topic
Author

HELP! reading a text file *************

rogelio uribe
Greenhorn

Joined: Aug 01, 2001
Posts: 14
Hi there:
I must deal with a common text file on my program. When I runthe program on a PC, everything is fine, but once I put it on the web server (UNIX) I doesn't run.
Here is the line where I'm getting an error:
DataInput FileID = new DataInputStream(new FileInputStream("results.txt"));
The error is:
netscape.security.AppletSecurityException: security.checkread: Read of 'results.txt' not permitted
can anybody give a hint, please?
Roger


Roger
Peter Simard
Ranch Hand

Joined: Oct 31, 2001
Posts: 54
Just a thought here, but as applets can't access the disk directly, you'll need to go through some sort of interface. While i don't know how to implement this, i beleive a Java servlet would be a way to go.
Again, just a thought.
PAS
------------------
PAS
peter@panvox.net
2b | | !2b


PAS<br />peter@panvox.net<br />2b || !2b
rogelio uribe
Greenhorn

Joined: Aug 01, 2001
Posts: 14
Thanx for sharing your "Thoughts", I've forgotten that little detail (My program is an applet).
Any ideas?

Originally posted by Peter Simard:
Just a thought here, but as applets can't access the disk directly, you'll need to go through some sort of interface. While i don't know how to implement this, i beleive a Java servlet would be a way to go.
Again, just a thought.
PAS

Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Either make it a signed applet, or write the results file out to someplace where you DO have access rights (like Peter said - if this was a Servet you could write to the server).
You could look into writing it to a cookie. Of course not all users allow cookies.


"JavaRanch, where the deer and the Certified play" - David O'Meara
rogelio uribe
Greenhorn

Joined: Aug 01, 2001
Posts: 14
Cindy:
Could you please explain me a little bit more about "signed applet"?
I'm looking for an quick alternative, because I need to put this information online as soon as possible, but I made a big mistake forgeting the applet security stuff.
Thanx.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
You can read about them here
Or you could do a search on "signed" in the Applet forum.
 
jQuery in Action, 2nd edition
 
subject: HELP! reading a text file *************
 
Similar Threads
Pause Output
ObjectOutputStream
line breaks in text file
compile errors
java.util.*;