From where does the applet get the file from?
The problem is probably with file permissions, as the others have said. You
don't have access to read from or write to any files on the user's hard
disk, unless you sign your applet (I think about $25/year).