My project has two folders: folder1
and folder2
.
In folder1
, I am trying to load a file present in folder2 using its reference path but it gives me the following exception: java.io.FileNotFoundException: /folder2/blah.txt (No such file or directory)
. It works when I use the absolute path.
file = new FileInputStream("/folder2/blah.txt")