I'm not certain, but I suspect that Jan is talking about your CLASSPATH environment variable. If you're on Windows you can go to your System Properties window, click on Environment Variables then on you CLASSPATH variable.
You can view it from a command prompt by entering the command:
> ECHO %CLASSPATH%
Again, I'm not sure that what was meant but give it a shot. You may want to save a copy of that variable before you start changing it. It's a list of folders on your system delimited by semi-colons (;).
Thank you all for your suggestions. Finally the program runs without this error.
I downloaded the jar multiple times and used it in the build path. Still got the same error.
So after some googling I found that sometimes the error goes away if new Java updates are installed.
So I installed java 7(had Java 6 previously) and the latest version of Eclipse and it works!!
So the changes I made are:
1) Latest version of Java and Eclipse
2) Download the rar file for Connector J from MySql.org and extract the entire file into Eclipse workspace.
3) Java Build Path - Add external jar- add the above jar
My pie came with a little toothpic holding up this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss