The CUBRID JDBC driver (cubrid_jdbc.jar) enables the system to make a connection to the CUBRID database in an application written in Java. The driver is located in the "location of CUBRID installed/jdbc" directory.
The CUBRID JDBC driver has been developed based on the JDBC 2.0 specification and provides compilation output generated in JDK version 1.6.
You can check the JDBC driver version as follows:
% jar -tf cubrid_jdbc.jar
META-INF/ META-INF/MANIFEST.MF
cubrid/ cubrid/jdbc/
cubrid/jdbc/driver/
cubrid/jdbc/jci/
cubrid/sql/
CUBRID-JDBC-8.1.4.1032
cubrid/jdbc/driver/CUBRIDBlob.class
...
Use the Class.forName (driver-class-name) command to register the JDBC driver. The following example shows how to load the cubrid.jdbc.driver.CUBRIDDriver class to register the CUBRID JDBC driver.
import java.sql.*;
import cubrid.jdbc.driver.*;
public class LoadDriver {
public static void main(String[] Args) {
try {
Class.forName("cubrid.jdbc.driver.CUBRIDDriver");
} catch (Exception e) {
System.err.println("Unable to load driver.");
e.printStackTrace();
}
...