@ThreadSafe public final class SystemProperties extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
clearWarnedPropertyNames()
Clear the cache with the property names, for which warnings were emitted
that keys don't exist.
|
static boolean |
containsPropertyName(String sPropertyName)
Check if a system property with the given name exists.
|
static String[] |
getAllJavaNetSystemProperties()
Get a set of system property names which are relevant for network
debugging/proxy handling.
|
static ICommonsMap<String,String> |
getAllProperties() |
static ICommonsSet<String> |
getAllPropertyNames() |
static ICommonsSet<String> |
getAllWarnedPropertyNames() |
static String |
getFileSeparator() |
static String |
getJavaClassPath() |
static String |
getJavaClassVersion() |
static String |
getJavaHome() |
static String |
getJavaLibraryPath() |
static String |
getJavaRuntimeName() |
static String |
getJavaRuntimeVersion() |
static String |
getJavaSpecificationUrl() |
static String |
getJavaSpecificationVendor() |
static String |
getJavaSpecificationVersion() |
static String |
getJavaVendor() |
static String |
getJavaVendorURL() |
static String |
getJavaVersion() |
static String |
getJavaVmName() |
static String |
getJavaVmSpecificationUrl() |
static String |
getJavaVmSpecificationVendor() |
static String |
getJavaVmSpecificationVersion() |
static String |
getJavaVmUrl() |
static String |
getJavaVmVendor() |
static String |
getJavaVmVersion() |
static String |
getLineSeparator() |
static String |
getOsArch() |
static String |
getOsName() |
static String |
getOsVersion() |
static String |
getPathSeparator() |
static String |
getPropertyValue(String sKey) |
static String |
getPropertyValueOrNull(String sKey) |
static String |
getTmpDir() |
static String |
getUserDir() |
static String |
getUserHome() |
static String |
getUserName() |
static String |
removePropertyValue(String sKey)
Remove a system property value under consideration of an eventually present
SecurityManager. |
static EChange |
setPropertyValue(String sKey,
boolean bValue)
Set a system property value under consideration of an eventually present
SecurityManager. |
static EChange |
setPropertyValue(String sKey,
int nValue)
Set a system property value under consideration of an eventually present
SecurityManager. |
static EChange |
setPropertyValue(String sKey,
long nValue)
Set a system property value under consideration of an eventually present
SecurityManager. |
static EChange |
setPropertyValue(String sKey,
String sValue)
Set a system property value under consideration of an eventually present
SecurityManager. |
public static final String SYSTEM_PROPERTY_FILE_SEPARATOR
public static final String SYSTEM_PROPERTY_JAVA_CLASS_PATH
public static final String SYSTEM_PROPERTY_JAVA_CLASS_VERSION
public static final String SYSTEM_PROPERTY_JAVA_LIBRARY_PATH
public static final String SYSTEM_PROPERTY_JAVA_HOME
public static final String SYSTEM_PROPERTY_JAVA_IO_TMPDIR
public static final String SYSTEM_PROPERTY_JAVA_RUNTIME_NAME
public static final String SYSTEM_PROPERTY_JAVA_RUNTIME_VERSION
public static final String SYSTEM_PROPERTY_JAVA_SPECIFICATION_URL
public static final String SYSTEM_PROPERTY_JAVA_SPECIFICATION_VENDOR
public static final String SYSTEM_PROPERTY_JAVA_SPECIFICATION_VERSION
public static final String SYSTEM_PROPERTY_JAVA_VENDOR
public static final String SYSTEM_PROPERTY_JAVA_VENDOR_URL
public static final String SYSTEM_PROPERTY_JAVA_VERSION
public static final String SYSTEM_PROPERTY_JAVA_VM_NAME
public static final String SYSTEM_PROPERTY_JAVA_VM_SPECIFICATION_URL
public static final String SYSTEM_PROPERTY_JAVA_VM_SPECIFICATION_VENDOR
public static final String SYSTEM_PROPERTY_JAVA_VM_SPECIFICATION_VERSION
public static final String SYSTEM_PROPERTY_JAVA_VM_URL
public static final String SYSTEM_PROPERTY_JAVA_VM_VENDOR
public static final String SYSTEM_PROPERTY_JAVA_VM_VERSION
public static final String SYSTEM_PROPERTY_LINE_SEPARATOR
public static final String SYSTEM_PROPERTY_OS_ARCH
public static final String SYSTEM_PROPERTY_OS_NAME
public static final String SYSTEM_PROPERTY_OS_VERSION
public static final String SYSTEM_PROPERTY_PATH_SEPARATOR
public static final String SYSTEM_PROPERTY_USER_DIR
public static final String SYSTEM_PROPERTY_USER_HOME
public static final String SYSTEM_PROPERTY_USER_NAME
public static final String SYSTEM_PROPERTY_SUN_IO_SERIALIZATION_EXTENDEDDEBUGINFO
public static void clearWarnedPropertyNames()
@Nonnull @ReturnsMutableCopy public static ICommonsSet<String> getAllWarnedPropertyNames()
@Nonnull public static EChange setPropertyValue(@Nonnull String sKey, boolean bValue)
SecurityManager.sKey - The key of the system property. May not be null.bValue - The value of the system property.EChange@Nonnull public static EChange setPropertyValue(@Nonnull String sKey, int nValue)
SecurityManager.sKey - The key of the system property. May not be null.nValue - The value of the system property.EChange@Nonnull public static EChange setPropertyValue(@Nonnull String sKey, long nValue)
SecurityManager.sKey - The key of the system property. May not be null.nValue - The value of the system property.EChange@Nonnull public static EChange setPropertyValue(@Nonnull String sKey, @Nullable String sValue)
SecurityManager.sKey - The key of the system property. May not be null.sValue - The value of the system property. If the value is null
the property is removed.EChange@Nullable public static String removePropertyValue(@Nonnull String sKey)
SecurityManager.sKey - The key of the system property to be removed. May not be
null.null if there was no property with that key.@Nullable public static String getJavaVersion()
java.version@Nullable public static String getJavaVendor()
java.vendor@Nullable public static String getJavaVendorURL()
java.vendor.url@Nullable public static String getJavaClassVersion()
java.class.version@Nullable public static String getJavaClassPath()
java.class.path@Nullable public static String getJavaLibraryPath()
java.library.path@Nullable public static String getOsVersion()
os.version@Nullable public static String getFileSeparator()
file.separator@Nullable public static String getPathSeparator()
path.separator@Nullable public static String getLineSeparator()
line.separator@Nullable public static String getJavaVmName()
java.vm.name@Nullable public static String getJavaVmSpecificationVersion()
java.vm.specification.version@Nullable public static String getJavaVmSpecificationVendor()
java.vm.specification.vendor@Nullable public static String getJavaVmSpecificationUrl()
java.vm.specification.url@Nullable public static String getJavaVmVersion()
java.vm.version@Nullable public static String getJavaVmVendor()
java.vm.vendor@Nullable public static String getJavaVmUrl()
java.vm.url@Nullable public static String getJavaSpecificationVersion()
java.specification.version@Nullable public static String getJavaSpecificationVendor()
java.specification.vendor@Nullable public static String getJavaSpecificationUrl()
java.specification.url@DevelopersNote(value="This property is not part of the language but part of the Sun SDK") @Nullable public static String getTmpDir()
java.io.tmpdir@Nullable public static String getJavaRuntimeVersion()
java.runtime.version@Nullable public static String getJavaRuntimeName()
java.runtime.version@Nonnull @ReturnsMutableCopy public static ICommonsSet<String> getAllPropertyNames()
null.@Nonnull @ReturnsMutableCopy public static ICommonsMap<String,String> getAllProperties()
public static boolean containsPropertyName(String sPropertyName)
sPropertyName - The name of the property.true if such a system property is present,
false otherwise@Nonnull @ReturnsMutableCopy public static String[] getAllJavaNetSystemProperties()
null and never empty.
Each call returns a new array.Copyright © 2014–2022 Philip Helger. All rights reserved.