Related Documentation Download this Manual Excerpts from this Manual


This page has moved or been replaced. The new page is located here:

Please update any bookmarks that point to the old page.

Download this Manual
User Comments
  Posted by Anthony Rossano on August 24, 2006
On Mac OSX 10.4, simply putting the connector/j in the /System/Library/Java/Extensions folder was not enough for me.

This command:
would throw this error:
"Exception in thread "main" java.lang.NoClassDefFoundError: test/class"

After much pain, I set the classpath environment variable manually in the .profile file as follows:


And all was well.

  Posted by Ian Stanton on October 12, 2006
I had exactly the same problem and was pulling my hair out.
I am running OS X 10.4 on an Intel Mac.
My problem differed slightly in that copying the mysql-connector-java-5.0.3 folder (which is the download file) to the /system/library/java/extensions folder wasn't enough. I had to copy the mysql-connector-java-5.0.3-bin.jar out of the mysql-connector-java-5.0.3 folder and put it in extensions.
For some reason I don't understand it wasn't visible while in its enclosing folder.
I have spent hours trying to get this working but at least it's over now.
  Posted by Zhen Wang on October 15, 2007
I don't think JVM search for all folders and files in the jar directory. It only look through the files in Extension folder.
  Posted by Satya Prakash on September 14, 2010
I am having problem connecting mysql from Java. Error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at mysqlConnEx.main(

I am on Win7.
I tried to put the jar file in ext and also com and org folder there. but no one method has solved my problem. I spent many hours.
  Posted by Satya Prakash on September 14, 2010
Finally solved. I have read everywhere but not here. The next page said about the file "mysql-connector-java-3.1.14-bin-g.jar". I read that putting the jar file "mysql-connector-java-3.1.14-bin.jar" is enough for Java mysql connection. but for some reason it was not working.
Another problem I have is that I have possibly downloaded 64-bit JDK but installed jre version is of 32-bit. So, I have two Jre installed. So for some reason putting file "mysql-connector-java-3.1.14-bin.jar" in C:\Program Files (x86)\Java\jre6\lib\ext\ was not working. So I have added dubug (1st file mentioned) to the ext folder.
But I finally removed "mysql-connector-java-3.1.14-bin-g.jar" from 32-bit jre folder. and not it is working.
  Posted by Dr Lars Wendowski on June 2, 2011
We also cannot get it working Windows 7, 64bit MySQL 32

Any step by steps how we can add this to our ODBC connections?
  Posted by sedrick jefferson on November 29, 2012
if you have windows 7 and your jdbc driver is not connecting then you should find the mysql-connector-java-5.1.20-bin.jar in your program files x86 folder.(driver may be different version depending on when you download the driver)

if the program file x86 folder. then find mysql folder. then find you connector folder(my connector folder is connector J yours may be different). next right click on the mysql-connector-java-5.1.20-bin.jar. chose cut then past the file to your desktop. Open netbeans I am using version 7.2. find the project you want to add this file to using the project explorer on the left hand side. right click on that project's libraries folder. click add jar/folder. click desktop on the left had side. find mysql-connector-java-5.1.20-bin. click open/add. now run your program.
Sign Up Login You must be logged in to post a comment.