To ensure that the Java Virtual Machine finds the MaxDB JDBC driver sapdbc.jar, add it to the environment variable CLASSPATH.
If you do not want to include the JDBC driver in environment variable CLASSPATH, you can transfer the complete path of sapdbc.jar using the –cp option when you call the Java Virtual Machine:
Microsoft Windows:
java -cp <independent_program_path>\runtime\jar\sapdbc.jar
UNIX (sh):
java -cp <independent_program_path>/runtime/jar/sapdbc.jar
...
1. To add the path of the JDBC driver to the environment variable CLASSPATH, proceed as follows:
Microsoft Windows:
set CLASSPATH=%CLASSPATH%;<independent_program_path>\runtime\jar\sapdbc.jar
UNIX (sh)
export CLASSPATH=$CLASSPATH:<independent_program_path>/runtime/jar/sapdbc.jar
2. If necessary, also add the environment variable CLASSPATH to the login profile of the current operating system user.
See also: