systemProperties

Synopsis

% systemProperties()

Returns a hash of the available system properties.

Returns

A read-only hash of all the available system properties.

Examples

# list properties of your system... foreach $property => $value (systemProperties()) { println("$property : $value"); }

java.runtime.name : Java(TM) 2 Runtime Environment, Standard Edition java.vm.version : 1.5.0_07-87 java.vm.vendor : "Apple Computer, Inc." java.runtime.version : 1.5.0_07-164 os.arch : ppc os.name : Mac OS X os.version : 10.4.8 user.home : /Users/raffi user.name : raffi java.version : 1.5.0_07

%props = systemProperties(); println("My userid is: " . %props["user.name"]); println("I belong at: " . %props["user.home"]);

My userid is: raffi I belong at: /Users/raffi

# set a system property [System setProperty: "test.prop", "foo"]; # retreive it: println(systemProperties()["test.prop"]);

foo