Loading the jConnect driver

Before you can use jConnect in your application, load the driver with the following statement:

DriverManager.registerDriver( (Driver)
    Class.forName(
    "com.sybase.jdbc3.jdbc.SybDriver").newInstance()
    );

Using the newInstance method works around issues in some browsers.

  • As the classes are loaded using Class.forName, the package containing the jConnect driver does not have to be imported using import statements.

  • To use jConnect 6.0.5, jconn3.jar must be in your class file path when you run the application. jconn3.jar is located in the classes subdirectory of your jConnect 6.0.5 installation (typically, jConnect-6_0\classes).