[color=darkblue]System.getProperties()
返回的是Properties
Properties 类表示了一个持久的属性集
[/color]
返回的是Properties
Properties 类表示了一个持久的属性集
[/color]
Properties props = new Properties();
try {
InputStream in = new BufferedInputStream (new FileInputStream(filePath));
props.load(in);
Enumeration en = props.propertyNames();
while (en.hasMoreElements()) {
String key = (String) en.nextElement();
String Property = props.getProperty (key);
System.out.println(key+Property);
}
} catch (Exception e) {
e.printStackTrace();
}