Yes it does exist and there is permission to read the file.
I tried to call the file by calling relative path like this (for this the file was copied to parent directory of my working directory)
String filename="../file.txt";
it worked.
But when I am giving folder name like this (for this the file was copied to child directory named "folder" of my working directory)
String filename="./folder/file.txt";
it is not working.
When just the file name is given like this
String filename="file.txt";
it is working and is taking from the working directory.
Why is it so?
Is there any restriction in giving folder names?
Is it not possible to give full filepath for a file?
Can you please give me a full example where you have referred the file with its full filepath? I think that will help