在linux与window下\与/的区别,可以通过以下方法优雅解决:
public static void main(String[] args) {
Properties properties = System.getProperties();
Enumeration<?> propertyNames = properties.propertyNames();
while (propertyNames.hasMoreElements()) {
String key = (String)propertyNames.nextElement();
System.out.println(key+"---->"+properties.getProperty(key));
}
}