Setting the environment variables There are several environment variables that must be set depending on the method that you selected to run the tools and startup utilities. Derbyenvironment setup environment variablesDERBY_HOME environment variablesJAVA_HOME environment variablesDERBY_HOME environment variablesPATHDERBY_HOMEenvironment variable, settingJAVA_HOMEenvironment variable, settingPATHenvironment variable, setting As mentioned in choosing a method to run the Derby tools and startup utilities, you must set the DERBY_HOME environment variable so that you can use the command examples that are presented in this manual. Adding the scripts directory to your command execution PATH makes the scripts easier to use and enables you to use the script examples in this manual. The CLASSPATH environment variable must be set if you are using in a Java program or executing the tools using the java command.

The steps below show you how to set the environment variables in a command window. The settings are only valid for that window. If you close the command window or open a new command window, you must set the environment variables again. You can also set environment variables permanently. For example, on Windows you can use the Control Panel to permanently set the environment variables.

To set the environment variables:

Set the environment variable to the location where you extracted the bin distribution. For example, if you installed in the /opt/ directory on UNIX or in the c:\ directory on Windows, use the following command to set the environment variable: Operating SystemCommand UNIXexport =/opt/ Windowsset =c:\. Be certain that the java.exe file, version 1.4.2 or, higher is in your command execution PATH. Open a command window and run the java -version command. Add the /bin directory to the PATH environment variable so that you can run the scripts from any directory. Operating SystemCommand UNIXexport PATH="$/bin:$PATH" Windowsset PATH=%%\bin;%PATH%. If you use the Control Panel to update your system PATH, add %%\bin to the end of the PATH environment variable When the environment variable is set and the underlying /bin directory is included in the PATH environment variable, you can use shortened commands to start the tools. Otherwise, either you must be in the directory where the script that starts the tool is located, or you must specify the full path to the location of the script when you want to start the tool. For more information on the scripts included in the bin distribution, see .