I have a class that reads a config file from the project root but it is not finding the file.
My read class is in com.br.xxx.util package
String filename = "config.properties";
input = getClass().getResourceAsStream(filename);
This code returns null even though "config.properties" is in my project root. What am I doing wrong?
If I use:
InputStream input = new FileInputStream("C:\\Users\\xxxx\\git\\projectfolder\\project\\config.properties");
configFile.load(input);
It works, but I don't want to use a system path.