Loading the JDBC Driver

Use

You use the forName method of the Class class in the Java platform.

Prerequisites

?     You have installed a Java platform:

0     Sun Java JRE 1.2 or, for the application development Sun Java JDK 1.2 (for JDBC 2.0)

0     Sun Java 2 Standard Edition 1.4 or 1.5 or, for the application development Sun Java JDK 1.4 or 1.5 (for JDBC 3.0)

?     You have added the sapdbc.jar path to the CLASSPATH environment variable.

Procedure

Class.forName ("com.sap.dbtech.jdbc.DriverSapDB");

For more information about the forName method, see the documentation for the Java platform at sun.java.com.

Result

When executing the Java application, the Java platform loads the MaxDB JDBC driver and registers it automatically in the JDBC driver manager.

If an exception of the class java.lang.ClassNotFoundException is triggered, the Java platform could not find the MaxDB JDBC driver.