This is actually driving me crazy. I do not understand why cannot I read a simple .txt file.
FileInputStream inputStream = new FileInputStream("/Resources/ExternalArchives/tokens.txt");
try {
String everything = IOUtils.toString(inputStream);
} finally {
inputStream.close();
}
As you might have guessed, the file is located inside the project, in a Source folder called Resources. I have tried everything possible and keep getting the same exception.
java.io.FileNotFoundException: ExternalArchives\tokens.txt (The system cannot find the path specified)
Other paths that I have tried...
"/Smoothie/Resources/ExternalArchives/tokens.txt"
"/Resources/ExternalArchives/tokens.txt"
"/ExternalArchives/tokens.txt"
"ExternalArchives/tokens.txt"
"tokens.txt"
I am using Eclipse IDE Neon.3.
Thank you!