Procedure documentationLoading the JDBC Driver Locate this document in the navigation structure

Prerequisites

You have installed the SAP MaxDB JDBC driver.

More information: Installing the SAP MaxDB JDBC Driver and Java Classes

Procedure

Use the forName method of the Java platform's Class class.

Syntax Syntax

  1. Class.forName ("com.sap.dbtech.jdbc.DriverSapDB");
End of the code.

Result

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

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

More Information

Documentation for the Java platform at http://java.sun.com