|
install4j API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.install4j.api.windows.WinEnvVars
public class WinEnvVars
Collection of static methods to get and modify environment variables on Windows.
Constructor Summary | |
---|---|
WinEnvVars()
|
Method Summary | |
---|---|
static void |
appendToPath(java.lang.String value)
Appends one or more directories to the PATH environment variable. |
static void |
appendToUserPath(java.lang.String value)
Appends one or more directories to the user-specific PATH environment variable on Windows NT/2000/XP/Vista. |
static java.util.Properties |
getenv()
Returns all environment variables. |
static java.lang.String |
getenv(java.lang.String key)
Returns a single environment variable. |
static void |
prependToPath(java.lang.String value)
Prepends one or more directories to the PATH environment variable. |
static void |
prependToUserPath(java.lang.String value)
Prepends one or more directories to the user-specific PATH environment variable on Windows NT/2000/XP/Vista. |
static void |
set(java.lang.String key,
java.lang.String value)
Sets a global environment variable. |
static void |
setUserSpecific(java.lang.String key,
java.lang.String value)
Sets a user-specific environment variable on NT/2000/XP/Vista. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WinEnvVars()
Method Detail |
---|
public static void set(java.lang.String key, java.lang.String value) throws java.io.IOException
key
- the name of the environment variablevalue
- the value of the environment variable
java.io.IOException
- if the environment variable could not be setpublic static void setUserSpecific(java.lang.String key, java.lang.String value) throws java.io.IOException
key
- the name of the environment variablevalue
- the value of the environment variable
java.io.IOException
- if the environment variable could not be setpublic static java.lang.String getenv(java.lang.String key)
key
- the name of the environment variable. Case does not matter.
public static java.util.Properties getenv()
public static void appendToPath(java.lang.String value) throws java.io.IOException
value
- the value to be appended to the path
java.io.IOException
- if the environment variable could not be setpublic static void prependToPath(java.lang.String value) throws java.io.IOException
value
- the value to be appended to the path
java.io.IOException
- if the environment variable could not be setpublic static void appendToUserPath(java.lang.String value) throws java.io.IOException
value
- the value to be appended to the path
java.io.IOException
- if the environment variable could not be setappendToPath(String)
public static void prependToUserPath(java.lang.String value) throws java.io.IOException
value
- the value to be appended to the path
java.io.IOException
- if the environment variable could not be setprependToPath(String)
|
install4j API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |