I’m trying to load a properties file without using the actual path of the file. I’ve already done that on some other simple apps using:
InputStream inputStream = ClassLoader.getSystemResourceAsStream(PROPERTIES_FILE); props.load(inputStream);
But this time it doesn’t work. The inputStream is null for some reason. PROPERTIES_FILE is a constant defined as ‘app.properties’. I tried to remove the .properties extension and got the same results.
Any ideas?
Thanks.
The PROPERTIES_FILE constant should include the package as well as the properties file (e.g. ‘com/some/library/file.properties’.