public static String getProperty (String key)

Gets the system property indicated by the specified key.

First, if there is a security manager, its checkPropertyAccess method is called with the key as its argument. This may result in a SecurityException.

If there is no current set of system properties, a set of system properties is first created and initialized in the same manner as for the getProperties method.

Parameters:
key    the name of the system property.

Returns:  the string value of the system property, or null if there is no property with that key.

Exceptions:
SecurityException    if a security manager exists and its checkPropertyAccess method doesn't allow access to the specified system property.
NullPointerException    if key is null.
IllegalArgumentException    if key is empty.

See also:
setProperty, java.lang.SecurityException, java.lang.SecurityManager.checkPropertyAccess(java.lang.String), java.lang.System.getProperties()