I was looking at a post in the Java Tips section which provided some code for viewing system properties. It hard-coded a list of system properties, rather than listing every available property.

I wasn't able to reply to that post, so I'm creating a new thread. For those needing to get a complete list of system properties, you can use the following code (from here).


import java.util.Properties;
import java.util.Enumeration;

public class SysProp {

public static void main(String[] args) {
Properties sysprops = System .getProperties();
Enumeration e = sysprops.propertyNames();
while (e.hasMoreElements()) {
String key = (String)e.nextElement();
String value = sysprops.getProperty(key);
System.out.println(key + "=" + value);
}
}

}