How to Install Java and how to set PATH and CLASSPATH variable in Windows 7

15 Apr 2015    03:19 pm

                Hello Friends i am writing this post to help people like me who have started learning java so setting classpath and path comes in to our way. So hope this post will help us all.
 

Here are the Steps to download and setting PATH and CLASSPATH:

Step1: 

Download the JDK(Java Development Kit) HERE

Step2:

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

Step3:

Java folder contain two folders of name like  jdk1.6.0_20 and jre6.

Step4:

Now we will set the classpath and path for java in our windows 7 machine
Right Click on My Computer and go to the Properties.

Step5:

Now Click on Advanced System settings

Step6:

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

Step7:

  Click on New  under system variable on Environment Variables Window.

Step8:

A new window for New System Variable will open

Step9:

 Before Variable Name  write path.

Step10:

Before variable value type C:Program FilesJavajdk1.6.0_20bin

Step11:

Click on Ok and Now to set classpath again click on New and again New System Variables  will appear.

Step12:

Enter

Variable nameclasspath and Variable ValueC:/Program Files/Javajdk1.6.0_20/lib.

Step13:

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