I am trying to load a properties file without using the actual file path. I have already done this in some other simple applications using:
InputStream inputStream = ClassLoader.getSystemResourceAsStream(PROPERTIES_FILE); props.load(inputStream);
But this time it wonβt work. For some reason, the input stream is zero. PROPERTIES_FILE - A constant defined as "app.properties". I tried to remove the .properties extension and got the same results.
Any ideas?
Thanks.
java properties classloader
Lancelot
source share