|
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
Handle global 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. |
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. |
static void |
set(java.lang.String key,
java.lang.String value)
Sets a global environment variable. |
static void |
set(java.lang.String key,
java.lang.String value,
boolean typeExpand)
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. |
static void |
setUserSpecific(java.lang.String key,
java.lang.String value,
boolean typeExpand)
Sets a user specific environment variable on NT/2000/XP. |
| 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 env varvalue - the value of the env var
java.io.IOException
public static void set(java.lang.String key,
java.lang.String value,
boolean typeExpand)
throws java.io.IOException
key - the name of the env varvalue - the value of the env vartypeExpand - true if the value contains expandable entities. This only applies to Windows NT/2000/XP
java.io.IOException
public static void setUserSpecific(java.lang.String key,
java.lang.String value)
throws java.io.IOException
key - the name of the env varvalue - the value of the env var
java.io.IOException
public static void setUserSpecific(java.lang.String key,
java.lang.String value,
boolean typeExpand)
throws java.io.IOException
key - the name of the env varvalue - the value of the env vartypeExpand - true if the value contains expandable entities. This only applies to Windows NT/2000/XP
java.io.IOExceptionpublic static java.lang.String getenv(java.lang.String key)
key - the name of the env var. Case doesn't 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
public static void prependToPath(java.lang.String value)
throws java.io.IOException
value - the value to be appended to the path
java.io.IOException
public static void appendToUserPath(java.lang.String value)
throws java.io.IOException
value - the value to be appended to the path
java.io.IOException
public static void prependToUserPath(java.lang.String value)
throws java.io.IOException
value - the value to be appended to the path
java.io.IOException
|
install4j API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||