Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Mysql driver suddenly won't load in eclipse

 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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

Class.forName("comm.mysql.jdbc.Driver").newInstance();

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
 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Mike,
Please don't cross-post the same question in multiple forums. Please continue discussion in the IDEs thread
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic