Load HCL OneDB JDBC Driver

To load HCL OneDB™ JDBC Driver, use the Class.forName() method, passing it the value com.informix.jdbc.IfxDriver:
try 
    {
    Class.forName("com.informix.jdbc.IfxDriver");
    } 
catch (Exception e)
    {
    System.out.println("ERROR: failed to load Informix JDBC driver.");
    e.printStackTrace();
    return;
    }

The Class.forName() method loads the HCL OneDB implementation of the Driver class, IfxDriver. IfxDriver then creates an instance of the driver and registers it with the DriverManager class.

After you have loaded OneDB JDBC Driver, you are ready to connect to the HCL OneDB database or database server.

If you are writing an applet to be viewed with Microsoft™ Internet Explorer, you might need to explicitly register OneDB JDBC Driver to avoid platform incompatibilities.

To explicitly register the driver, use the DriverManager.registerDriver() method:
DriverManager.registerDriver(com.informix.jdbc.IfxDriver) 
   Class.forName("com.informix.jdbc.IfxDriver").newInstance());

This method might register OneDB JDBC Driver twice, which does not cause a problem.