Hi,
Think you are doing well. I am a beginner in
java. So, i faced a problem now. can you please help? I am trying to connect with mysql using connector/j(latest). I use:
1] mysql connector/j
2] mysql 5.1(It was installed automatically when i am installing xampp)
3] java 6
4] eclipse gallilio for
JEE developers.
What i do:
1]at first i unzip the mysql connector/j.zip file on C:\
2] write the code like this way:
DB CLASS:
GetMySqlConnection(main) Class:
3]
a] As i use windows xp, i add the classpath by going property of "my computer", clicked on "Advanced" tab,clicked "Environment Variable" and create a new variable,"CLASSPATH" and the value is,"C:\mysql-connector-java-5.0.8\mysql-connector-java-5.0.8-bin.jar;".It does not work. Throws an exception by eclipse console mode. that is:
b] So, i delete the classpath variable from "environment variables". My second attempt was, Eclipse->Window->Preference->java->Build Path->Classpath Variables. Then click on "new" button and set "Name" and "Path" as "classpath" and "C:/mysql-connector-java-5.0.8/mysql-connector-java-5.0.8-bin.jar" by browsing the file. Again i run the code and found the same error:
I know most of you know the solve. Perhaps, there is a problem that system can not found the driver or the "connector/j" and java 6 version is not compatible each other. But i am not sure what happened. Please help me.
A little bit long description i written down here, i know. If there is some mistakes i am so sorry. Have a nice day.
Thanking you
codeperl