File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes mySql Driver - ClassNotFoundException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "mySql Driver - ClassNotFoundException" Watch "mySql Driver - ClassNotFoundException" New topic
Author

mySql Driver - ClassNotFoundException

Yvette Gonzalez
Greenhorn

Joined: Jun 27, 2002
Posts: 10
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?
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

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

Joined: Jun 27, 2002
Posts: 10
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!
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

From where are you trying to load the mySql driver (web-server, standalone program)?
/Rene


Regards, Rene Larsen
Dropbox Invite
Yvette Gonzalez
Greenhorn

Joined: Jun 27, 2002
Posts: 10
From a standalone program. Thanks in advance for any assistance!
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

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

Joined: Jun 27, 2002
Posts: 10
Thanks Rene - I used the -classpath option and it worked!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mySql Driver - ClassNotFoundException
 
Similar Threads
prisoner problem
Which RSS reader do u use?
What UML Tool(s) are you using for SCEA Beta Part II?
Convincing the management
Beta Part II submission acknowledgement