Please send your Questions & Answers or Feedback to "mohan@javabook.org"

How do I load a database driver with JDBC 4.0 / Java 6?


Provided the JAR file containing the driver is properly configured, just place the JAR file in the classpath. Java developers NO longer need to explicitly load JDBC drivers using code like Class.forName() to register a JDBC driver.The DriverManager class takes care of this by automatically locating a suitable driver when the DriverManager.getConnection() method is called. This feature is backward-compatible, so no changes are needed to the existing JDBC code.

Related Posts Plugin for WordPress, Blogger...
Flag Counter