类 EnvironmentUtils
java.lang.Object
com.sh.common.exec.environment.EnvironmentUtils
Description:
Title:首亨软件 - CRM、TSS、ERP等信息化管理软件
-
方法概要
修饰符和类型方法说明static voidaddVariableToEnvironment(Map environment, String keyAndValue) Add a key/value pair to the given environment.static MapFind the list of environment variables for this process.static String[]Get the variable list as an array.
-
方法详细资料
-
toStrings
Get the variable list as an array.- 参数:
environment- the environment to use, may benull- 返回:
- array of key=value assignment strings or
nullif and only if the input map wasnull
-
getProcEnvironment
Find the list of environment variables for this process. The returned map preserves the casing of a variable's name on all platforms but obeys the casing rules of the current platform during lookup, e.g. key names will be case-insensitive on Windows platforms.- 返回:
- a map containing the environment variables, may be empty but never
null - 抛出:
IOException- the operation failed
-
addVariableToEnvironment
Add a key/value pair to the given environment. If the key matches an existing key, the previous setting is replaced.- 参数:
environment- the current environmentkeyAndValue- the key/value pair
-