I have text file with name pwd.txt
located in projectfolder->src->pwd.txt
and I am accessing this file as follows:
File f1 = new File("src\\pwd.txt");
if(f1.exists()==false){
System.out.println("file not");
}
FileReader fr = new FileReader(f1);
while ((ch = fr.read()) != -1) {
pass = pass + (char) ch;
}
LoginForm.pwd = pass;
fr.close();
Well, let me tell you first that I am able to access this file when running within the IDE
(Eclipse) but I am not able to access that filepwd.txt
when I have made the jar
file.
When i saw the contents of that jar
file, I can see the file pwd.txt