Setting Environment Variables

Windows Systems

There are several ways to get to the Environment Variables panel in the Windows system. One way is as follows: 
 
On Windows XP and Vista:
Start -> Control Panel -> System to open the System properties panel. 
 
On Windows 7:
Start -> Control Panel -> System and Security -> System to open the System properties panel. 
 
From there, look for an Advanced tab (XP) or an Advanced Systems Settings link (Vista and Windows 7). 
 
Then, click the Environment Variables button. 
 
Finally, you have reached the place where you can define or change a name and value for any environment variable. We recommend updating the "System" variables if you have permissions, simply to make sure these settings are always defined on your computer. It is not necessary to enclose the value string in single or double quotes; just type the text. 
 
If you do not have Administrator permissions, then only the "User" variables will be available for you to modify. Using these simply means that anyone else logging in with a different user name will not have those variables defined. 

Linux Systems

The syntax to define an environment variable differs depending on your shell environment. Since the bash shell is most common on Linux, we'll start with that shell.

bash, sh, ksh shells

The quickest way to define the variable is shown below with a pair of examples: 
 export REACTION_LICENSE_FILE=28850@aardvark.com 

or

export CKJAVAMEMORY="-Xms1024M -Xmx1024M"  

Since you typically will want that value defined every time you log in, you typically update the ~/.bashrc or ~/.profile or other shell startup files.

csh and tcsh shells

The way to define the variable is shown below with a pair of examples: 
 setenv REACTION_LICENSE_FILE 28850@aardvark.com 

or

setenv CKJAVAMEMORY "-Xms1024M -Xmx1024M"  

Since you typically will want that value defined every time you log in, you typically update the ~/.login or ~/.cshrc or other shell startup files.

Use quotes to enclose the value if it contains spaces

If the value of the variable includes spaces, like the CKJAVAMEMORY example, then you must use double or single quotes around the value.