• Post Reply 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

jdbc mysql --- ClassNotFoundException problem ... please help

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am porting an application over from using an oracle db to a mysql db. I was doing the oracle dev on a unix box, but now I am on Windows 2000. I am having a configuration problem. I have looked through the online suggestions, but found no solution.
Some code:

This is the important code where it is having problems. Basically, the things I have seen tell me that I have to place the driver [ currently using mysql-connector-java-3.0.9-stable-bin.jar from mysql.com ] where it can be seen. I have it stored in a directory under the C: drive and have added the jar file to the classpath, ie. added C:\somedir\mysql-connector-java-3.0.9-stable-bin.jar to the PATH variable in the environment variables. Can anyone suggest how to fix this?
I also tried adding the jar file to the C:\JAVA_HOME\jre\lib\ext but no luck there either. Please help.
 
Bill Mares
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, figured it out.
I had 2 installed jdk directories and had placed the jar file in the wrong one. Sorry about the question.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
FYI, you add stuff into the classpath by using the CLASSPATH environment variable, not PATH.
reply
    Bookmark Topic Watch Topic
  • New Topic