// System Properties
/**
Thanks to:
The java Class Libraries 2nd Ed., Vol. 1
by Chan, Lee, and Kramer
*/
import java.util.*;
public class SystemProp {
public static void main(String[] args) {
// Get all of the properties available
Properties props = System.getProperties();
// Enumerate the properties and get their values
for (Enumeration enum = props.propertyNames(); enum.hasMoreElements();) {
String key = (String)enum.nextElement();
String property = (String)(props.get(key));
System.out.println(key + " = " + property );
}
// Users current working directory
String userDir = System.getProperty("user.dir");
System.out.println("\nUsers directory: " + userDir);
}
}