skip to main content
Getting Started : Using the Drivers : Connecting Using the JDBC Driver Manager : Registering the Drivers
  
Registering the Drivers
If using Java SE 6 or higher, you do not need to register the drivers and can skip this step. Java SE 6 and higher automatically registers the drivers with the JDBC Driver Manager.
Registering the drivers with the JDBC Driver Manager allows the JDBC Driver Manager to load them. The class names of the drivers are:
DataDirect Connect for JDBC
*com.ddtek.jdbc.db2.DB2Driver
*com.ddtek.jdbc.informix.InformixDriver
*com.ddtek.jdbc.mysql.MySQLDriver
*com.ddtek.jdbc.oracle.OracleDriver
*com.ddtek.jdbc.openedge.OpenEdgeDriver
*com.ddtek.jdbc.postgresql.PostgreSQLDriver
*com.ddtek.jdbc.sqlserver.SQLServerDriver
*com.ddtek.jdbc.sybase.SybaseDriver
DataDirect Connect XE for JDBC
*com.ddtek.jdbc.hive.HiveDriver
*com.ddtek.jdbc.greenplum.GreenplumDriver
*com.ddtek.jdbc.sforce.SForceDriver
You can register the drivers with the JDBC Driver Manager using any of the following methods:
*Method 1: Set the Java system property jdbc.drivers using the Java -D option. The jdbc.drivers property is defined as a colon-separated list of driver class names. This example registers the DB2 driver and the SQL Server driver.
java -Djdbc.drivers=com.ddtek.jdbc.db2.DB2Driver:
com.ddtek.jdbc.sqlserver.SQLServerDriver
*Method 2: Set the Java property jdbc.drivers from within your Java application or applet. Include the following code fragment in your Java application or applet, and call DriverManager.getConnection(). This example registers the SQL Server driver.
Properties p = System.getProperties();
p.put ("jdbc.drivers",
"com.ddtek.jdbc.sqlserver.SQLServerDriver");
System.setProperties (p);
*Method 3: Explicitly load the driver class using the standard Class.forName() method. Include the following code fragment in your application or applet and call DriverManager.getConnection(). This example registers the DB2 driver.
Class.forName("com.ddtek.jdbc.db2.DB2Driver");