Here we can create an instance of the Driver class to load a JDBC driver.
The syntax to declare an instance of the Driver class is:
Driver d =new ;
Ex: Driver d = new sun.jdbc.odbc.JdbcOdbcDriver ( );
Once we have created the Driver object, call the registerDriver ( ) method to register it with the DriverManager. We can register the JDBC-ODBC Bridge driver using the following method call to registerDriver ( ) method:
Setting System Property
Driver can also be loaded by setting System property for JDBC drivers. We add the driver name to the jdbc.driver System property to load a JDBC driver. We use the –D command line option to set the system property on the command line. The command to set the system property is: