I've downloaded the Connector/J and included mysql-connector-java-5.1.15-bin.jar in my Java Build Path, yet I keep getting a "ClassNotFoundException: com.mysql.jdbc.Driver" on what I assume to be this line: "Class.forName("com.mysql.jdbc.Driver").newInstance();" (there was no line number provided) does anyone know what I'm doing wrong?
You need to do one of the following; Roll the mysql connector into your plugin. Put the path to the mysql connector in your manifest.mf file. Put the mysql connector in the following directory; <java_install>/jre6/lib/ext/
I've tried #3, and it didn't work. not sure how to edit the manifest.mf file, nor sure what you mean by "rolling" the MySQL connector into my plugin. but since you said one of the following, I'm assuming that the placement of the connector in #3 should have fixed it. any thoughts?
If I were you, I would spam every ext directory under the java tree until it works, because it will. Under windows it worked for me here; C:\Program Files (x86)\Java\jre6\lib\ext In Linux it worked for me here; /usr/lib/jvm/java-6-openjdk/jre/lib/ext and here; /usr/lib/jvm/jdk1.7.0/jre/lib/ext (two different servers) EDIT by Moderator: merged posts, please use the edit button instead of double posting.
yeah, I'm currently trying to get it work on my windows machine, where the path is "C:\Program Files (x86)\Java\jre6\lib\ext" yet it is not working edit: here's a screenshot as you can see, the JAR file is in there.
Okay, just type 'set' but without the quotes. That should list all of your variables. The JAVA_HOME should be in there. Or, you can go into your system and check your environmental variables and see if it's in there.
I'm glad to read that! It was very frustrating to setup on my first attempt so I'm glad to help others get it working.