Current Directory ? How?

I finally got the applet sign and got the certification to work... thanks to ncoleman1.

As my java code consists of :-

ip = new FileReader("clue.txt");

run together with a java.policy stored in c:\windows and certification ask for permission to grant/deny but consists of error message java.io.FileNotFoundException:clue.txt (The system cannot find the file specified)

--But--

ip = new FileReader("c:\\windows\\desktop\\test\\clue.txt");

the applet can run and display the data in clue.txt on the screen and I think it bypass the certification as it didn't ask for permission to grant / deny as I always select "grant this session only".

I just want the applets to run and look the file in the current directory where the html is stored. As I always stored all files in one directory.

Can help?

[864 byte] By [keitooi] at [2007-9-26 16:11:56]
# 1
use String currentPath=System.getProperty("user.dir") to gain current directoryip = new FileReader(currentPath+"clue.txt");
comtodn at 2007-7-2 19:34:33 > top of Java-index,Archived Forums,Java Programming...
# 2
The directory where the HTML is stored? That would be on the same server where the applet was loaded from, would it not? In other words, on some other machine. If you want to get clue.txt from that directory, you must get it from the server via HTTP.
DrClap at 2007-7-2 19:34:33 > top of Java-index,Archived Forums,Java Programming...