Properties: list(PrintStream out) : Properties « java.util « Java by API






Properties: list(PrintStream out)

  
/*
 * Output:
-- listing properties --
java.runtime.name=Java(TM) 2 Runtime Environment, Stand...
java.vm.version=1.5.0-b64
java.vm.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
path.separator=;
java.vm.name=Java HotSpot(TM) Client VM
file.encoding.pkg=sun.io
user.country=US
sun.os.patch.level=Service Pack 2
java.vm.specification.name=Java Virtual Machine Specification
java.runtime.version=1.5.0-b64
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
...
...
 */

import java.util.Properties;

public class MainClass {
  public static void main(String[] args) {
    Properties properties = System.getProperties();
    properties.list(System.out);
  }
}
           
         
    
  








Related examples in the same category

1.new Properties()
2.new Properties(Properties prop)
3.Properties: getProperty(String key)
4.Properties: getProperty(String key, String defaultValue)
5.Properties: load(InputStream inStream)
6.Properties: loadFromXML(InputStream in)
7.Properties: keySet()
8.Properties: propertyNames()
9.Properties: setProperty(String key, String value)
10.Properties: store(OutputStream out, String comments)
11.Properties: storeToXML(OutputStream os, String comment)