Listing All System Properties
import java.util.Enumeration; import java.util.Properties; public class Main { public static void main(String[] argv) throws Exception { Properties props = System.getProperties(); Enumeration e = props.propertyNames(); for (; e.hasMoreElements();) { String propName = (String) e.nextElement(); System.out.println(propName ); String propValue = (String) props.get(propName); System.out.println(propValue); } } }