• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help needed with JDBC driver

 
jonty rhodes
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Im a newbie to Java and JDBC. I have jsut installed mysql on Windows ME and installed a JDBC driver (MYSQL connector/J driver). I have copied a mysql-connector-java-3.0.10-stable-bin.jar file to C:/mysql. I have also added this to the path by doing start-run-msconfig-enviornment-path and then adding the following line:
.;c:\mysql\mysql-connector-java-3.0.10-stable-bin.jar;
when i run a simple program to check if the driver is there. it gives me a
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver exception.
My code is as follows which compiles successfully.

COuld anyone please tell me what im doing wrong. I need help desperately because this is the starting point of my learning and im stuck here. Thanks a lot for your help
[ February 13, 2004: Message edited by: Bear Bibeault ]
 
Ray Twigg
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jonty,
I'm a complete novice too. I lost quite a few hours yesterday with what seems to be the same problem. There is much advice out there about getting the CLASSPATH correct but that did not fix it for me. My problem seems to be that I installed the runtime environment some time ago and have now installed the development kit. Once I copied the jar file to ...\jre\lib\ext in both installations it worked. Well, at least it connected to the database, what I got back is another story.
 
jonty rhodes
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once I copied the jar file to ...\jre\lib\ext in both installations it worked. Well, at least it connected to the database
where is that directory?. I really need help on this. This is the first step of learning about database operation using Java. Help would be greatly appreciated.
 
jonty rhodes
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After searching google, i finally solved the problem..didn't copy that jar file to my Java_home. Thanks Ray for your input.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic