• 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

Help needed with JDBC driver

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic