Well I understand that this question has been asked multiple times, but despite following all the advice in those links I still end up getting file not found error.
These are the links I've already checked.
Where do I put the txt file that I want to read in Java?
How to really read text file from classpath in Java
So please don't get trigger happy marking it as duplicate.
For one most of these links seem to use the word ClassPath and BuildPath interchangeably, are they the one and the same thing, coz in my IDE I can't seem to find anything related to ClassPath, it's only BuildPath.
So this is my directory structure.
The caller class needs the file
Well I've tried pretty much everything in the links and I still can't read the file.
The code that reads the file is here
String path = "DataSource/data1.txt";
String jsonData = null;
try {
jsonData = Reader.readFile(path);
} catch (Exception e) {
e.printStackTrace();
}
Any help appreciated.