File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Where should I put the jar? java.lang.ClassNotFoundException: com.mysql.jdbc.Driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Where should I put the jar? java.lang.ClassNotFoundException: com.mysql.jdbc.Driver" Watch "Where should I put the jar? java.lang.ClassNotFoundException: com.mysql.jdbc.Driver" New topic
Author

Where should I put the jar? java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

luis sep
Greenhorn

Joined: Mar 30, 2012
Posts: 4
Hello everyone,
I know this is a beginners question and I swear I've done previous research, but I just can't figure out where to put the mysql-connector-java-5.0.8-bin.jar

I am using Tomcat5.5 and I've tried placing it under server/lib, in Tomcat's -> configuration -> java -> classpath and in Windows' classpath, but it just won't work.
Any idea?

Thanks in advance
Luis
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

i think you make a lib dir under WEB-INF and put it there, (well when eclipse just made me a war file, it made a lib directory under WEB-INF)
luis sep
Greenhorn

Joined: Mar 30, 2012
Posts: 4
Thanks Wendy,
In the end, I decided to download Tomcat 6, it works now.
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

Your welcome tomcat 5 is a bit old, isn't tomcat 7 the newest shinyest version?
luis sep
Greenhorn

Joined: Mar 30, 2012
Posts: 4
Yes, I was just wondering why does that happen.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Where should I put the jar? java.lang.ClassNotFoundException: com.mysql.jdbc.Driver