I have a piece of code defining a property like this:
public static final String DEFINED_KEY = "definedKey";
public static final String DEFINED_PROPERTY = "definedProperty";
// [...]
File f = File.createTempFile("default", ".properties");
PrintWriter pw = new PrintWriter(f);
Properties pp = new Properties();
pp.setProperty(DEFINED_KEY, DEFINED_PROPERTY);
pp.store(pw, "Automatically defined");
pw.close();
Which saves a properties file OK
#No comments
#Mon Feb 13 17:25:12 CET 2012
definedKey=definedProperty
When I create another property and perform a load()
on it, it loads OK. get(DEFINED_KEY)
returns the value specified for DEFINED_PROPERTY
, but getProperty(DEFINED_KEY)
returns null
. What's up with this?