Adding the Path for sapdbc.jar to the CLASSPATH Environment Variable


You add the path for the sapdbc.jar file to the CLASSPATH environment variable so that the Sun Java platform can find the MaxDB JDBC driver and the MaxDB Java classes.


You have installed the software component JDBC (see Installation Manual, Software Components).



       1.      To add the sapdbc.jar path to the CLASSPATH environment variable, enter the following command:

Microsoft Windows

set CLASSPATH=%CLASSPATH%;<independent_program_path>\runtime\jar\sapdbc.jar

UNIX (sh)

export CLASSPATH=$CLASSPATH:<independent_program_path>/runtime/jar/sapdbc.jar

If you do not want to include the path for sapdbc.jar in the CLASSPATH environment variable, you can specify the entire path for sapdbc.jar path when calling Java as follows:

Microsoft Windows

java -cp <independent_program_path>\runtime\jar\sapdbc.jar

UNIX (sh)

java -cp <independent_program_path>/runtime/jar/sapdbc.jar

       2.      If necessary, add the CLASSPATH environment variable to the login profile of the current operating system user.

See also:

Installation Manual, Directories