chrriis.common
Enum SystemProperty

java.lang.Object
  extended by java.lang.Enum<SystemProperty>
      extended by chrriis.common.SystemProperty
All Implemented Interfaces:
Serializable, Comparable<SystemProperty>

public enum SystemProperty
extends Enum<SystemProperty>

This enum is supposed to be a complete list of available syste properties on different JVM and Java versions. Use get() or toString() to access the property values or set(String) to update them - but only those that aren't read-only (isReadOnly()). If you discover some new properties in your environment, please run the contained main(String[]) method and send the output to me: You may want to check for updates once in a while: http://techblog.molindo.at/files/SystemProperty.java and http://techblog.molindo.at/2009/11/java-system-properties.html $LastChangedRevision: 4287 $

Author:
Stefan Fussenegger

Enum Constant Summary
AWT_NATIVE_DOUBLE_BUFFERING
          Mac only: true or false
AWT_TOOLKIT
          Mac only: known values: apple.awt.CToolkit
FILE_ENCODING
           
FILE_ENCODING_PKG
           
FILE_SEPARATOR
           
FTP_NON_PROXY_HOSTS
          Mac only: known values: local|*.local|169.254/16|*.169.254/16
GOPHER_PROXY_SET
          Mac only: true or false
HTTP_NON_PROXY_HOSTS
          Mac only: known values: local|*.local|169.254/16|*.169.254/16
JAVA_AWT_GRAPHICSENV
           
JAVA_AWT_PRINTERJOB
           
JAVA_CLASS_PATH
           
JAVA_CLASS_VERSION
           
JAVA_ENDORSED_DIRS
           
JAVA_EXT_DIRS
           
JAVA_HOME
           
JAVA_IO_TMPDIR
          path to temporary directory including trailing file separator
JAVA_LIBRARY_PATH
           
JAVA_RUNTIME_NAME
           
JAVA_RUNTIME_VERSION
           
JAVA_SPECIFICATION_NAME
           
JAVA_SPECIFICATION_VENDOR
           
JAVA_SPECIFICATION_VERSION
           
JAVA_VENDOR
           
JAVA_VENDOR_URL
           
JAVA_VENDOR_URL_BUG
           
JAVA_VERSION
           
JAVA_VM_INFO
           
JAVA_VM_NAME
           
JAVA_VM_SPECIFICATION_NAME
           
JAVA_VM_SPECIFICATION_VENDOR
           
JAVA_VM_SPECIFICATION_VERSION
           
JAVA_VM_VENDOR
           
JAVA_VM_VERSION
           
JAVAWEBSTART_VERSION
           
LINE_SEPARATOR
           
MRJ_VERSION
          Mac only: known values: 1060.1.6.0_15-219
OS_ARCH
           
OS_NAME
          see http://lopica.sourceforge.net/os.html for possible values
OS_VERSION
           
PATH_SEPARATOR
           
SOCKS_NON_PROXY_HOSTS
          Mac only: known values: local|*.local|169.254/16|*.169.254/16
SUN_ARCH_DATA_MODEL
           
SUN_AWT_DISABLEMIXING
           
SUN_AWT_NOERASEBACKGROUND
           
SUN_AWT_XEMBEDSERVER
           
SUN_BOOT_CLASS_PATH
           
SUN_BOOT_LIBRARY_PATH
           
SUN_CPU_ENDIAN
           
SUN_CPU_ISALIST
           
SUN_DESKTOP
          Linux only: known values: gnome
SUN_IO_UNICODE_ENCODING
           
SUN_JAVA_LAUNCHER
           
SUN_JNU_ENCODING
           
SUN_MANAGEMENT_COMPILER
           
SUN_OS_PATCH_LEVEL
           
USER_COUNTRY
           
USER_DIR
           
USER_HOME
           
USER_LANGUAGE
           
USER_NAME
           
USER_TIMEZONE
           
 
Method Summary
 String get()
           
 String get(String defaultValue)
           
 String getName()
           
 boolean isReadOnly()
          whether this property should not be modified (i.e.
static void main(String[] args)
          a simple main method to list available system properties. additionally, it generates Java code for yet unknown properties.
 String set(String value)
           
 String toDebugString()
           
 String toString()
           
static SystemProperty valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SystemProperty[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FILE_ENCODING

public static final SystemProperty FILE_ENCODING

FILE_ENCODING_PKG

public static final SystemProperty FILE_ENCODING_PKG

FILE_SEPARATOR

public static final SystemProperty FILE_SEPARATOR

JAVA_AWT_GRAPHICSENV

public static final SystemProperty JAVA_AWT_GRAPHICSENV

JAVA_AWT_PRINTERJOB

public static final SystemProperty JAVA_AWT_PRINTERJOB

JAVA_CLASS_PATH

public static final SystemProperty JAVA_CLASS_PATH

JAVA_CLASS_VERSION

public static final SystemProperty JAVA_CLASS_VERSION

JAVA_ENDORSED_DIRS

public static final SystemProperty JAVA_ENDORSED_DIRS

JAVA_EXT_DIRS

public static final SystemProperty JAVA_EXT_DIRS

JAVA_HOME

public static final SystemProperty JAVA_HOME

JAVA_IO_TMPDIR

public static final SystemProperty JAVA_IO_TMPDIR
path to temporary directory including trailing file separator


JAVA_LIBRARY_PATH

public static final SystemProperty JAVA_LIBRARY_PATH

JAVA_RUNTIME_NAME

public static final SystemProperty JAVA_RUNTIME_NAME

JAVA_RUNTIME_VERSION

public static final SystemProperty JAVA_RUNTIME_VERSION

JAVA_SPECIFICATION_NAME

public static final SystemProperty JAVA_SPECIFICATION_NAME

JAVA_SPECIFICATION_VENDOR

public static final SystemProperty JAVA_SPECIFICATION_VENDOR

JAVA_SPECIFICATION_VERSION

public static final SystemProperty JAVA_SPECIFICATION_VERSION

JAVA_VERSION

public static final SystemProperty JAVA_VERSION

JAVA_VENDOR

public static final SystemProperty JAVA_VENDOR

JAVA_VENDOR_URL

public static final SystemProperty JAVA_VENDOR_URL

JAVA_VENDOR_URL_BUG

public static final SystemProperty JAVA_VENDOR_URL_BUG

JAVAWEBSTART_VERSION

public static final SystemProperty JAVAWEBSTART_VERSION

JAVA_VM_INFO

public static final SystemProperty JAVA_VM_INFO

JAVA_VM_NAME

public static final SystemProperty JAVA_VM_NAME

JAVA_VM_SPECIFICATION_NAME

public static final SystemProperty JAVA_VM_SPECIFICATION_NAME

JAVA_VM_SPECIFICATION_VENDOR

public static final SystemProperty JAVA_VM_SPECIFICATION_VENDOR

JAVA_VM_SPECIFICATION_VERSION

public static final SystemProperty JAVA_VM_SPECIFICATION_VERSION

JAVA_VM_VERSION

public static final SystemProperty JAVA_VM_VERSION

JAVA_VM_VENDOR

public static final SystemProperty JAVA_VM_VENDOR

LINE_SEPARATOR

public static final SystemProperty LINE_SEPARATOR

OS_NAME

public static final SystemProperty OS_NAME
see http://lopica.sourceforge.net/os.html for possible values


OS_ARCH

public static final SystemProperty OS_ARCH

OS_VERSION

public static final SystemProperty OS_VERSION

PATH_SEPARATOR

public static final SystemProperty PATH_SEPARATOR

SUN_ARCH_DATA_MODEL

public static final SystemProperty SUN_ARCH_DATA_MODEL

SUN_BOOT_CLASS_PATH

public static final SystemProperty SUN_BOOT_CLASS_PATH

SUN_BOOT_LIBRARY_PATH

public static final SystemProperty SUN_BOOT_LIBRARY_PATH

SUN_CPU_ENDIAN

public static final SystemProperty SUN_CPU_ENDIAN

SUN_CPU_ISALIST

public static final SystemProperty SUN_CPU_ISALIST

SUN_IO_UNICODE_ENCODING

public static final SystemProperty SUN_IO_UNICODE_ENCODING

SUN_JAVA_LAUNCHER

public static final SystemProperty SUN_JAVA_LAUNCHER

SUN_JNU_ENCODING

public static final SystemProperty SUN_JNU_ENCODING

SUN_MANAGEMENT_COMPILER

public static final SystemProperty SUN_MANAGEMENT_COMPILER

SUN_OS_PATCH_LEVEL

public static final SystemProperty SUN_OS_PATCH_LEVEL

USER_COUNTRY

public static final SystemProperty USER_COUNTRY

USER_DIR

public static final SystemProperty USER_DIR

USER_HOME

public static final SystemProperty USER_HOME

USER_LANGUAGE

public static final SystemProperty USER_LANGUAGE

USER_NAME

public static final SystemProperty USER_NAME

USER_TIMEZONE

public static final SystemProperty USER_TIMEZONE

SUN_AWT_DISABLEMIXING

public static final SystemProperty SUN_AWT_DISABLEMIXING

SUN_AWT_NOERASEBACKGROUND

public static final SystemProperty SUN_AWT_NOERASEBACKGROUND

SUN_AWT_XEMBEDSERVER

public static final SystemProperty SUN_AWT_XEMBEDSERVER

SUN_DESKTOP

public static final SystemProperty SUN_DESKTOP
Linux only: known values: gnome


AWT_NATIVE_DOUBLE_BUFFERING

public static final SystemProperty AWT_NATIVE_DOUBLE_BUFFERING
Mac only: true or false


AWT_TOOLKIT

public static final SystemProperty AWT_TOOLKIT
Mac only: known values: apple.awt.CToolkit


FTP_NON_PROXY_HOSTS

public static final SystemProperty FTP_NON_PROXY_HOSTS
Mac only: known values: local|*.local|169.254/16|*.169.254/16


GOPHER_PROXY_SET

public static final SystemProperty GOPHER_PROXY_SET
Mac only: true or false


HTTP_NON_PROXY_HOSTS

public static final SystemProperty HTTP_NON_PROXY_HOSTS
Mac only: known values: local|*.local|169.254/16|*.169.254/16


MRJ_VERSION

public static final SystemProperty MRJ_VERSION
Mac only: known values: 1060.1.6.0_15-219


SOCKS_NON_PROXY_HOSTS

public static final SystemProperty SOCKS_NON_PROXY_HOSTS
Mac only: known values: local|*.local|169.254/16|*.169.254/16

Method Detail

values

public static SystemProperty[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SystemProperty c : SystemProperty.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SystemProperty valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

get

public String get()
Returns:
the string value of the system property, or null if there is no property with that key.
See Also:
System.getProperty(String), AccessController.doPrivileged(PrivilegedAction)

get

public String get(String defaultValue)
Parameters:
defaultValue - the default value to return if the property is not defined.
Returns:
the string value of the system property, or the default value if there is no property with that key.
See Also:
System.getProperty(String), AccessController.doPrivileged(PrivilegedAction)

set

public String set(String value)
Parameters:
value - the new value
Throws:
UnsupportedOperationException - if this property is read-only
See Also:
System.setProperty(String, String), AccessController.doPrivileged(PrivilegedAction), isReadOnly()

getName

public String getName()
Returns:
name of this property

isReadOnly

public boolean isReadOnly()
whether this property should not be modified (i.e. "read-only"). Note that it is possible to use System.setProperty(String, String) directly. It's use is discouraged though (as it might not have the desired effect)

Returns:
true if this property should not be modified

toString

public String toString()
Overrides:
toString in class Enum<SystemProperty>
Returns:
property value (same as get()
See Also:
get()

toDebugString

public String toDebugString()
Returns:
a string representation of this object (e.g. "OS_NAME: os.name=Linux (read-only)")

main

public static void main(String[] args)
a simple main method to list available system properties. additionally, it generates Java code for yet unknown properties. If you find some of them, please let us know: http://techblog.molindo.at/2009/11/java-system-properties.html

Parameters:
args - arguments are ignored