• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

mySQL driver

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I downloaded the latest mySQL driver(mm.mysql-2.0.14) and unjared it into C:\mm.mysql-2.0.14.
So far so good.
I wrote a simple java program in Visual Cafe to access mySQL database using the dirver. I put the driver's home directory (C:\mm.mysql-2.0.14) in the directories for the visual cafe project, and it works perfectly.
Now, when I try to run it from the command prompt, previously setting my classpath and path enviroment variables to C:\mm.mysql-2.0.14, it gives me:
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
Why is it not finding it?? I've been playing with my classpath all day to get java.exe work (now it does thanks to the posts here) and when I finally get it this other classpath problem comes up
Can anyone help me please?
Thanks
Ayad Hindi
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you please post what you are typing at the command prompt to try and execute your java program. You also might want to show us your directory structure where your class files are located.
Thanks.
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you go to this page and follow a link under JavaRanch Cattle Drive - JDBC, you may find something helpful.
[ June 28, 2002: Message edited by: Marilyn deQueiroz ]
 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sound's like your classpath is not set correctly for your driver. Echo your class path to check if mm.mysql driver is in the path.
 
Ayad Hindi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for everyone for their replies.
The driver now works, I just needed to restart my computer !!!
Weird, I didn't need to restart for the jdk classpath but mysql driver I do.
Anyway, thanks for the help
Ayad Hindi
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic