Set the DERBY_INSTALL environment variable
Set the DERBY_INSTALL environment variable
The Derby documentation often refers to the base directory where the software was installed. Create an environment variable called DERBY_INSTALL and set its value to the path of the Derby base directory. For example, if you installed the product in c:\Derby_10, set DERBY_INSTALL to c:\Derby_10\apache-derby-10.0:
set DERBY_INSTALL=c:\Derby_10\apache-derby-10.0
Set the class pathSet the class path
The JVM (compiler or interpreter) needs to know the path (operating system instructions about location) of every class file needed by your application. The class path is a list of the class libraries needed by the JVM and other Java applications in order to run your program.
There are two ways to set the class path. You can set the operating system's CLASSPATH environment variable permanently or temporarily. If you set the environment variable temporarily, you must set it each time you open a new command window. Alternatively, you can set the class path with the runtime option, which means specifying the class path at the time you start your Java application and the JVM.
In most development environments, it works best to set the operating system's CLASSPATH environment variable temporarily.
For example, you can set your class path as follows:
set CLASSPATH=%DERBY_INSTALL%\lib\derby.jar; %DERBY_INSTALL%\lib\derbytools.jar;%CLASSPATH%
To run the sysinfo utility, type the following in a command window or shell:
java org.apache.derby.tools.sysinfo
To run the ij utility, type the following in a command window or shell:
java org.apache.derby.tools.ij ij> connect 'jdbc:derby:testdb;create=true';
When you are finished running the ij utility, type:
ij> exit;
For more information on running the ij and sysinfo utilities, see the IBM Derby Tools and Utilities Guide.
Previous Page
Next Page
Table of Contents
Index