Class SystemProperties
- Since:
- 3.13.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe System property name "awt.toolkit".static final StringThe System property name "file.encoding".static final StringThe System property name "file.separator".static final StringThe System property name "java.awt.fonts".static final StringThe System property name "java.awt.graphicsenv".static final StringThe System property name "java.awt.headless".static final StringThe System property name "java.awt.printerjob".static final StringThe System property name "java.class.path".static final StringThe System property name "java.class.version".static final StringThe System property name "java.compiler".static final StringThe System property name "java.endorsed.dirs".static final StringThe System property name "java.ext.dirs".static final StringThe System property name "java.home".static final StringThe System property name "java.io.tmpdir".static final StringThe System property name "java.library.path".static final StringThe System property name "java.locale.providers".static final StringThe System property name "java.runtime.name".static final StringThe System property name "java.runtime.version".static final StringThe System property name "java.specification.name".static final StringThe System property name "java.specification.vendor".static final StringThe System property name "java.specification.version".static final StringThe System property name "java.util.prefs.PreferencesFactory".static final StringThe System property name "java.vendor".static final StringThe System property name "java.vendor.url".static final StringThe System property name "java.version".static final StringThe System property name "java.vm.info".static final StringThe System property name "java.vm.name".static final StringThe System property name "java.vm.specification.name".static final StringThe System property name "java.vm.specification.vendor".static final StringThe System property name "java.vm.specification.version".static final StringThe System property name "java.vm.vendor".static final StringThe System property name "java.vm.version".static final StringThe System property name "line.separator".static final StringThe System property name "os.arch".static final StringThe System property name "os.name".static final StringThe System property name "os.version".static final StringThe System property name "path.separator".static final StringThe System property name "user.country".static final StringThe System property name "user.dir".static final StringThe System property name "user.home".static final StringThe System property name "user.language".static final StringThe System property name "user.name".static final StringThe System property name "user.region".static final StringThe System property name "user.timezone". -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGets the current value from the system properties map.static booleangetBoolean(String key, BooleanSupplier defaultIfAbsent) Gets the current value for the property namedkeyas anboolean.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static intgetInt(String key, IntSupplier defaultIfAbsent) Gets the current value for the property namedkeyas anint.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static longgetLong(String key, LongSupplier defaultIfAbsent) Gets the current value for the property namedkeyas along.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringgetProperty(String property) Gets a System property, defaulting tonullif the property cannot be read.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.static StringGets the current value from the system properties map.
-
Field Details
-
AWT_TOOLKIT
The System property name "awt.toolkit".- See Also:
-
FILE_ENCODING
The System property name "file.encoding".- See Also:
-
FILE_SEPARATOR
The System property name "file.separator".- See Also:
-
JAVA_AWT_FONTS
The System property name "java.awt.fonts".- See Also:
-
JAVA_AWT_GRAPHICSENV
The System property name "java.awt.graphicsenv".- See Also:
-
JAVA_AWT_HEADLESS
The System property name "java.awt.headless".- See Also:
-
JAVA_AWT_PRINTERJOB
The System property name "java.awt.printerjob".- See Also:
-
JAVA_CLASS_PATH
The System property name "java.class.path".- See Also:
-
JAVA_CLASS_VERSION
The System property name "java.class.version".- See Also:
-
JAVA_COMPILER
The System property name "java.compiler".- See Also:
-
JAVA_ENDORSED_DIRS
The System property name "java.endorsed.dirs".- See Also:
-
JAVA_EXT_DIRS
The System property name "java.ext.dirs".- See Also:
-
JAVA_HOME
The System property name "java.home".- See Also:
-
JAVA_IO_TMPDIR
The System property name "java.io.tmpdir".- See Also:
-
JAVA_LIBRARY_PATH
The System property name "java.library.path".- See Also:
-
JAVA_LOCALE_PROVIDERS
The System property name "java.locale.providers".- See Also:
-
JAVA_RUNTIME_NAME
The System property name "java.runtime.name".- See Also:
-
JAVA_RUNTIME_VERSION
The System property name "java.runtime.version".- See Also:
-
JAVA_SPECIFICATION_NAME
The System property name "java.specification.name".- See Also:
-
JAVA_SPECIFICATION_VENDOR
The System property name "java.specification.vendor".- See Also:
-
JAVA_SPECIFICATION_VERSION
The System property name "java.specification.version".- See Also:
-
JAVA_UTIL_PREFS_PREFERENCES_FACTORY
The System property name "java.util.prefs.PreferencesFactory".- See Also:
-
JAVA_VENDOR
The System property name "java.vendor".- See Also:
-
JAVA_VENDOR_URL
The System property name "java.vendor.url".- See Also:
-
JAVA_VERSION
The System property name "java.version".- See Also:
-
JAVA_VM_INFO
The System property name "java.vm.info".- See Also:
-
JAVA_VM_NAME
The System property name "java.vm.name".- See Also:
-
JAVA_VM_SPECIFICATION_NAME
The System property name "java.vm.specification.name".- See Also:
-
JAVA_VM_SPECIFICATION_VENDOR
The System property name "java.vm.specification.vendor".- See Also:
-
JAVA_VM_SPECIFICATION_VERSION
The System property name "java.vm.specification.version".- See Also:
-
JAVA_VM_VENDOR
The System property name "java.vm.vendor".- See Also:
-
JAVA_VM_VERSION
The System property name "java.vm.version".- See Also:
-
LINE_SEPARATOR
The System property name "line.separator".- See Also:
-
OS_ARCH
The System property name "os.arch".- See Also:
-
OS_NAME
The System property name "os.name".- See Also:
-
OS_VERSION
The System property name "os.version".- See Also:
-
PATH_SEPARATOR
The System property name "path.separator".- See Also:
-
USER_COUNTRY
The System property name "user.country".- See Also:
-
USER_DIR
The System property name "user.dir".- See Also:
-
USER_HOME
The System property name "user.home".- See Also:
-
USER_LANGUAGE
The System property name "user.language".- See Also:
-
USER_NAME
The System property name "user.name".- See Also:
-
USER_REGION
The System property name "user.region".- See Also:
-
USER_TIMEZONE
The System property name "user.timezone".- See Also:
-
-
Constructor Details
-
SystemProperties
public SystemProperties()
-
-
Method Details
-
getAwtToolkit
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getBoolean
Gets the current value for the property namedkeyas anboolean.- Parameters:
key- The keydefaultIfAbsent- The default value- Returns:
- an
booleanor defaultIfAbsent
-
getFileEncoding
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getFileSeparator
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getInt
Gets the current value for the property namedkeyas anint.- Parameters:
key- The keydefaultIfAbsent- The default value- Returns:
- an
intor defaultIfAbsent
-
getJavaAwtFonts
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaAwtGraphicsenv
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaAwtHeadless
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaAwtPrinterjob
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaClassPath
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaClassVersion
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaCompiler
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaEndorsedDirs
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaExtDirs
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaHome
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaIoTmpdir
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaLibraryPath
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaLocaleProviders
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.Java 9 and above.
- Returns:
- the current value from the system properties map.
-
getJavaRuntimeName
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaRuntimeVersion
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaSpecificationName
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaSpecificationVendor
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaSpecificationVersion
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaUtilPrefsPreferencesFactory
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaVendor
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaVendorUrl
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaVersion
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaVmInfo
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaVmName
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaVmSpecificationName
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaVmSpecificationVendor
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaVmSpecificationVersion
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaVmVendor
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getJavaVmVersion
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getLineSeparator
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getLong
Gets the current value for the property namedkeyas along.- Parameters:
key- The keydefaultIfAbsent- The default value- Returns:
- a
longor defaultIfAbsent
-
getOsArch
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getOsName
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getOsVersion
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getPathSeparator
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getProperty
Gets a System property, defaulting tonullif the property cannot be read.If a
SecurityExceptionis caught, the return value isnull.- Parameters:
property- the system property name- Returns:
- the system property value or
nullif a security problem occurs
-
getUserCountry
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getUserDir
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getUserHome
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getUserLanguage
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getUserName
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-
getUserTimezone
Gets the current value from the system properties map.Returns
nullif the property cannot be read due to aSecurityException.- Returns:
- the current value from the system properties map.
-