import java.util.Enumeration;
import java.util.Properties;
public class SystemExample {
public static void main(String[] args) {
Properties prop = System.getProperties();
Enumeration en = prop.keys();
while(en.hasMoreElements()){
String key = (String) en.nextElement();
String value = prop.getProperty(key);
System.out.println(key +" = "+value);
}
}
}
Gets the current System properties
Tags: java.lang
