How to set path and classpath variable for java in Windows 7

Hello Friends i am writing this post to help people like me who have started learning selenium and since in selenium RC and WebDriver we use java so setting classpath and path comes in to our way because we use Eclipse IDE for selenium automation script. So hope this post will help us all and if i am leaving anything then please write your view here as your comment

1-      Download  JDK 6 or 7

2-      Install JDK  and by Default Java installs at at this place  C:Program FilesJava

3-      Java folder contain two folder of name jdk1.6.0_20 and jre6

4-      Now we will set the classpath and path for java in our windows 7 machine

5-      Right Click on My Computer

6-      Now click on Advanced System Setting.



7-      Click on Environment Variables on next window that appears after clicking Advanced System Setting.



8-      Click on New  under system variable on Environment Variables Window



9-      A new window for New System Variable will open

10-   Before Variable Name  write path

11-   Before variable value type C:Program FilesJavajdk1.6.0_20bin


12-   Click on Ok

13-   Now to set classpath again click on New and again New System Variables  will appear

14-   Enter

Variable name = classpath and Variable Value = C:/Program Files/Javajdk1.6.0_20/lib



15-   Now click Ok  and again click Ok on Environment Variables

16-   Finally we have set path and classpath  and now start you java coding  best of luck



Did you enjoy this article?
Signup today and receive free updates straight in your inbox. We will never share or sell your email address.


Leave a Reply

Your email address will not be published. Required fields are marked *