Two Laptop Bag
The moose likes JDBC and Relational Databases and the fly likes Mysql driver suddenly won't load in eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Reply locked New topic

Mysql driver suddenly won't load in eclipse

Mike Southgate
Ranch Hand

Joined: Jul 18, 2003
Posts: 183
I'm not sure if this is the correct forum or not for this...

I'm reatively new to eclipse, but I had it working for a few weeks with mysql.
Suddenly, my code cannot load the database driver for mysql, ie


throws an exception.

I must have done something to eclipse to make this happen but I'm not sure what.

When I first set up mysql with eclipse I copied the mysql-connector-java-3.0.14-production-bin.jar file into the lib\ext directory of my SDK and it's still there.

Could someone give me some pointers on how to track down the problem.

I suspect it's related to my making eclipse remember my decision with respect to running even when compile errors are present. This was inadvertent - how can I reverse it?

Any suggestions would be appreciated.


ms<br />SCJP, SCJD
PNS Subramanian
Ranch Hand

Joined: Jul 13, 2004
Posts: 150
For the first part of the question
Suspect that it is just an issue of adding the jar file to the classpath.
Try the following in eclipse
Right Click of project -> properties -> Java build path -> Libraries -> Add external jars -> Order and Export -> select All -> ok.

To stop running when there are compilation errors do the following
Window -> Preference -> Java -> Compiler - change the settings on the right tab as required.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33117

Please don't cross-post the same question in multiple forums. Please continue discussion in the IDEs thread

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Mysql driver suddenly won't load in eclipse
It's not a secret anymore!