System: getProperties() : System « java.lang « Java by API






System: getProperties()

    
/*
 * 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.System.exit(int status)
2.System.in
3.System.in.read()
4.System.out
5.System: arraycopy(Object src, int srcPos, Object dest, int destPos, int length)
6.System: clearProperty(String key)
7.System: console()
8.System: currentTimeMillis()
9.System: getenv(String key)
10.System: getProperty(String name)
11.System.getProperty ("user.dir")
12.System: getProperty(String key, String def)
13.System.identityHashCode(Object x)
14.System: nanoTime()
15.System.setErr(PrintStream err)
16.System: setIn(InputStream in)
17.System: setOut(PrintStream err)
18.System: setProperty(String key, String value)