分类: Java
2014-10-07 11:01:03
使用java.lang.System.setProperties(Properties props)一定要先java.lang.System.getProperties()
Sets the system properties to the Properties argument.
First, if there is a security manager, its checkPropertiesAccess method is called with no arguments. This may result in a security exception.
The argument becomes the current set of system properties for use by the method. If the argument is null, then the current set of system
properties is forgotten.
setProperties参数Properties覆盖System原有的Properties。
Properties properties = System.getProperties();
properties.load(inputStream);
inputStream.close();
System.setProperties(properties);