| Author |
jdbc mysql --- ClassNotFoundException problem ... please help
|
Bill Mares
Greenhorn
Joined: Dec 31, 2003
Posts: 4
|
|
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
Joined: Dec 31, 2003
Posts: 4
|
|
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
Joined: Jan 23, 2002
Posts: 11962
|
|
|
FYI, you add stuff into the classpath by using the CLASSPATH environment variable, not PATH.
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
 |
|
|
subject: jdbc mysql --- ClassNotFoundException problem ... please help
|
|
|