Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Bill Mares
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FYI, you add stuff into the classpath by using the CLASSPATH environment variable, not PATH.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic