Replicated the same scenario as in below sample program.
I am trying to read a file Test.txt
that is located outside my classes folder. I'm using getResourceAsStream
method to locate the file, but it's not recognizing. As long as my file is inside the classes folder it recognizes.
InputStream propFileInpStream = LocateFile.class.getResourceAsStream("../../../"+PROP_FILE);
Not recognizing if outside classes folder
Recognizing if anywhere inside classes folder structure