File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes How do I locate a JDBC driver? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "How do I locate a JDBC driver?" Watch "How do I locate a JDBC driver?" New topic

How do I locate a JDBC driver?

Chuck Minarik

Joined: Apr 06, 2006
Posts: 4
I wanted to setup a JBDCD-ODBC connection to an Access db. I searched and found out the driver I need is sun.jdbc.odbc.JdbcOdbcDriver...but I had to search a lot longer to find out which jar file this driver is located in...rt.jar...found the info buried in a forum post. Isn't there an easier way?

I've run into this problem several times before, so I'm hoping to find out the best way to resolve this problem in the future.

In general, if I know the driver, how do I find out which jar file it is contained in? TIA.
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3753


Or, more generally, ask whoever provides your database. For example, most databases, oracle/db2/mysql/etc ship with a specific JDBC driver that you should use for that version of the software. For example, if you are using Oracle, its better to use a JDBC driver for than one for (making up numbers). Even if they don't ship with it, its good to check the documentation on their website to find what driver they provide.

The ODBC is a special case since its a bridge rather than a direct JDBC driver which is why you can find information for it in rt.jar. Normally, the jar for a driver is completely external and must be downloaded from the db company's website.

[OCA 8 Book] [Blog]
I agree. Here's the link:
subject: How do I locate a JDBC driver?
It's not a secret anymore!