O'Reilly logo

Core Java® Volume II—Advanced Features, Ninth Edition by Gary Cornell, Cay S. Horstmann

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4.3.4. Registering the Driver Class

Many JDBC JAR files (such as the Derby driver included with Java SE 7) automatically register the driver class. In that case, you can skip the manual registration step that we describe in this section. A JAR file can automatically register the driver class if it contains a file META-INF/services/java.sql.Driver. You can simply unzip your driver’s JAR file to check.

Image Note

This registration mechanism uses a little-known part of the JAR specification; see http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#Service_Provider. Automatic registration is a requirement for a JDBC4-compliant driver.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required