
Again it gives the following error. java.lang.ClassNotFoundException: com.mysql.jdbc.Driver is there any necessaity to install anything

Yes, it is necessary if you are going to connect java code with database. Do you have mysql-connector-java-5.0.5.jar file in your jdk lib.
Anyways, if not, download it and put it into the following locations:
jdk/lib
jre/lib
jre/lib/ext
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.