public class SystemPropertys extends Object
| 构造器和说明 |
|---|
SystemPropertys() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
get(String key) |
static String |
get(String key,
String def)
Returns the value of the Java system property with the specified
key, while falling back to the specified default value if
the property access fails. |
static PropertiesAccessor |
getAccessor() |
static String |
getClassPathSeparator() |
static String |
getFileEncoding() |
static List<String> |
getJavaClassPath() |
static String |
getJavaClassPathString() |
static String |
getJavaClassVersion() |
static String |
getJavaEndorsedDirs() |
static String |
getJavaExtDirs() |
static String |
getJavaIOTmpDir() |
static String |
getJavaLibraryPath()
OS PATH environment variable
|
static String |
getJavaSpecificationVersion() |
static String |
getJavaVersion() |
static String |
getJREHome()
JRE home directory
|
static String |
getJREVersion()
JRE version
|
static String |
getLineSeparator() |
static String |
getOSArch() |
static String |
getOSName() |
static String |
getOSVersion() |
static String |
getUserHome() |
static Locale |
getUserLocal() |
static String |
getUserName() |
static String |
getUserWorkDir() |
static void |
setProperty(String key,
String value)
如果根据key获取到的值满足 predicate, 则将值设置为value
|
static void |
setPropertyIfAbsent(String key,
String value)
如果不存在 指定的key,则设置为 value
|
static void |
setPropertyIfMatched(String key,
Predicate<String> predicate,
String value)
如果根据key获取到的值满足 predicate, 则将值设置为value
|
public static final String NEWLINE
public static String getClassPathSeparator()
public static String getJavaClassPathString()
public static String getJavaEndorsedDirs()
public static String getJavaExtDirs()
public static String getJavaIOTmpDir()
public static String getJavaLibraryPath()
public static String getJREHome()
public static String getJREVersion()
public static String getJavaSpecificationVersion()
public static String getJavaClassVersion()
public static String getJavaVersion()
public static String getOSArch()
public static String getOSName()
public static String getOSVersion()
public static String getUserHome()
public static String getUserName()
public static Locale getUserLocal()
public static String getUserWorkDir()
public static String getFileEncoding()
public static String getLineSeparator()
public static String get(String key, String def)
key, while falling back to the specified default value if
the property access fails.def if there's no such property or if an access to the
specified property is not allowed.public static PropertiesAccessor getAccessor()
public static void setPropertyIfAbsent(String key, String value)
key - value - public static void setPropertyIfMatched(String key, Predicate<String> predicate, String value)
key - value - Copyright © 2021. All rights reserved.