My environment is ubuntu12.04+eclipse3.3.0+hadoop0.20.2
When I test on the System.serProperty, which would change the configuration defined in xml file. But I don't get the same effect when I test it. Here is my code snippet:
//cofiguration class test
public static void test() {
Configuration conf = new Configuration();
conf.addResource("raw/conf-1.xml");
System.out.println(conf.get("z"));
System.setProperty("z", "SystemProp_mz");
System.out.println(conf.get("z"));
}
conf-1.xml is as follows:
<configuration>
<property>
<name>z</name>
<value>mz</value>
</property>
</configuration>
the output is:
mz
mz
Could anyone give me some help? Thanks a lot!