I have the following code trying to read a properties file:
Properties prop = new Properties();
ClassLoader loader = Thread.currentThread().getContextClassLoader();
InputStream stream = loader.getResourceAsStream("myProp.properties");
prop.load(stream);
I get an exception at the last line. Specifically:
Exception in …
I have a list of key/value pairs of configuration values I want to store as Java property files, and later load and iterate through.
Questions:
Do I need to store the file in the same package as the class …