• 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 - ClassNotFoundException

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I put my mm.mysql-2.0.14-bin.jar file into my JavaHome\jre\lib\ext directory and I am still getting: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver. Any suggestions? Is there anything else that I need to do?
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Yvette Gonzalez:
I put my mm.mysql-2.0.14-bin.jar file into my JavaHome\jre\lib\ext directory and I am still getting: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver. Any suggestions? Is there anything else that I need to do?

did you add c:\path\mm.mysql-2.0.14-bin.jar to your classpath?
 
Yvette Gonzalez
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I have put this c:\mySQLDriver\mm.mysql-2.0.14\mm.mysql-2.0.14-bin.jar; in my classpath. I don't know what else to do!
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From where are you trying to load the mySql driver (web-server, standalone program)?
/Rene
 
Yvette Gonzalez
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From a standalone program. Thanks in advance for any assistance!
 
Rene Larsen
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are using windows 98/ME - have you then added the driver and a . to the CLASSPATH in autoexec.bat, and restarted your PC?
If windows NT/2000/XP - then you should have added the driver and a . to the CLASSPATH in your 'Environment Variables'.
You can also just use the -classpath option when you compile/run the code
(e.g. javac -classpath .;C:\mysql\jdbc\mm.mysql-2.0.14-bin.jar Test.java).
/Rene
[ June 29, 2002: Message edited by: Rene Larsen ]
 
Yvette Gonzalez
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Rene - I used the -classpath option and it worked!!
reply
    Bookmark Topic Watch Topic
  • New Topic