Wednesday 18 April 2012

Setting PATH and CLASSPATH in Java in Windows7 & XP (How to set PATH variable in Java in Windows7 & XP).

POSTED BY WASHIM RAZA WEDNESDAY, APRIL 18, 2012 1:35 PM


Setting PATH and CLASS variable in Java is not so difficult, You have to follow some steps and you have done...Just follow these steps and you have done!!!


First of all Install Java( either 5,6 or 7). You can download it from its official website.

After installing java go to C: then go to Program files here look for folder named java...





Now open that Java folder here you will find two folders named jdk1.6.0_20(if you are using java6) and jre6. Just click on jdk1.6.0_20





now after opening jdk1.6.0_20 open the "bin" folder and copy the whole path as shown in the following pictures...










Here you have done First step..let proceed towards second step...


Go to "My computer" and right click on it....


double click on MY COMPUTER


Now click on "Properties" If you are using Windows7 then it will look like this...





After this double click on "Advance System Settings" as indicated in above figure it will opened as...




Here click on Environment variable a new window will opened like this...




now on System Variable window click on new after that a window will opened in which give
variable name = PATH and variable value = "the whole path" you copied from bin folder its look like...




now press OK button. Here you set the path of the java, Now you have to set the CLASS for this again go to Environment variables.. Here on "Users Variable" window, Click on new and give the following value..

variable name = CLASS and variable value = "the whole path" you copied from lib folder.

All this are shown in the following pictures....



















Alas!!!! You have finished all your works of setting PATH and CLASS variables of Java....So enjoy Your Java Coding....