// File: SystemProperties.java // // Author: Rahul Simha // Created: Sept 23, 1998 // // Prints out System properties. import java.util.*; import java.io.*; public class SystemProperties { public static void main (String[] argv) { // The System class has a static function that // returns a Properties object: Properties p = System.getProperties(); // The entire list of properties can be enumerated. Enumeration e = p.propertyNames(); while (e.hasMoreElements()) { String propName = (String) e.nextElement(); String propVal = p.getProperty (propName); System.out.println (propName + "=" + propVal); } } }