Friday, July 24, 2009

Installing the Connector/J in Windows XP with JDK 1.6.0_14

I am writing this post only to note down some quick things that may not be remembered at all times, specially when it is needed :)

You can follow these steps:
  1. Extract the zip file mysql-connector-java-5.1.8.zip in any place as you wish.
  2. Copy file 'mysql-connector-java-3.1.12-bin.jar' from the extracted folder into \jre\lib\ext folder. jdk1.5\jre\lib\ext folder which on my system happens to be 'C:\Program Files\Java\jdk1.6.0_14\jre\lib\ext folder. jdk1.5\jre\lib\ext'.
  3. Go to control Panel->Advance->Environment Variable->System Variable.
  4. The next step depends on your system variable:
  5. IF YOU HAVE CLASSPATH:
  6. Click once at Classpath and then click edit.
  7. At the end of the Variable Value, simply put ';\jre\lib\ext\mysql-connector-java-5.1.8-bin.jar' (Without the single quotes ;) which on my system happens to be ';C:\Program Files\Java\jdk1.6.0_14\jre\lib\ext\mysql-connector-java-5.1.8-bin.jar'.
  8. Click OK.
  9. IF YOU DO NOT HAVE CLASSPATH:
  10. Click on New.
  11. Put 'CLASSPATH' at Variable name, and '.;\jre\lib\ext\mysql-connector-java-5.1.8-bin.jar' at Variable Value.
  12. Click OK

1 comment:

arvind said...

thanx for such a good help