[5366] in java-interest
RandomAccessFile error
daemon@ATHENA.MIT.EDU (Kenneth Cheng)
Tue Feb 6 17:35:59 1996
From: Kenneth Cheng <kcheng@cs.stanford.edu>
To: java-interest@java.sun.com
Date: Tue, 6 Feb 1996 13:02:48 -0800 (PST)
I try to create a random access file by declaring:
I keep getting a file exception error when I tried to open an existing file
which I have full access right. I wonder if it is my code or the system.
Following is a portion of my code:
RandomAccessFile file = new RandomAccessFile("ken.dat","rw");
ken.dat is located at the directory where my applet is located. I
was suspecting that maybe I have to specify a path. So I did the following:
File dir = new File("c:\data\");
File input = new File(dir,"ken.dat");
RandomAccessFile file = new RandomAccessFile(input,"rw");
I already created the file with a string "this is a test" in it. The system
keeps telling me "***Security Exception" file.read:ken.dat***". Why?
I am using Win95 and I did not set any security features to my file.
-
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com