It's not a secret anymore!*
The moose likes JDBC and the fly likes where to put my jdbc driver to mysql? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "where to put my jdbc driver to mysql?" Watch "where to put my jdbc driver to mysql?" New topic
Author

where to put my jdbc driver to mysql?

Bob Moranski
Ranch Hand

Joined: Nov 22, 2000
Posts: 177
Hi, I have a question. Where do I place mm.mysql.jdbc-1.0 package? Please help.
Peter Tran
Bartender

Joined: Jan 02, 2001
Posts: 783
If the documentation doesn't specify any specific directory, then place it where it makes sense for you and add the *.jar files to your classpath.
For example, where I work we have a project call Foo. Under Foo, we create a tools directory to place all third-party libraries.

-Peter
[This message has been edited by Peter Tran (edited January 11, 2001).]
Bob Moranski
Ranch Hand

Joined: Nov 22, 2000
Posts: 177
I am bit embarrassed to ask...but what is my classpath? Also, the package has subpackages, so, how do I jar it?
[This message has been edited by Bob Moranski (edited January 11, 2001).]
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
The classpath is the path that tells java where to find classes. Packages can only be accessed when they are on the classpath. If I remember correctly, the package for mysql is located in a jar file called mysql_comp.jar. Put this file is a directory (c:\java\lib might be a good place) and then update your classpath variable to add c:\java\lib\mysql_comp.jar. Jar and Zip files have to listed explicitly.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Syed Waqas Badshah
Greenhorn

Joined: Jun 18, 2004
Posts: 1
Hi,
I am a student working on J2EE enviroment using JSP and MySQL. I am using a Webserver JRun 4 and eventually everything is working but I cannot access my database file because it asking me for JDBC driver. As far as I know I have place JDBC driver in every folder but it still don't pick up my JDBC Driver the Jar file.

My program was running before until I have to format my pc. and when I install everything again it is giving me an error in JDBC Driver. Now please tell me how to set my classpath if that is the case or I have to place JDBC Driver somewhere so it could pick it up. I am using JDK1.4.3 and still it can't find my driver.
Please help
its urgent.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30377
    
150

Syed,
Welcome to Javaranch!

You don't need to have the driver in the same directory. Just make sure to put the driver jar file in your system CLASSPATH variable.

Also note that the original thread is from 2001. It's ok to start a new thread for a new question.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: where to put my jdbc driver to mysql?