Java - Installation and running a first java program - Environment Variable Path Setup Tutorial
Set up environment variables
To set an environment variable. Go to This Pc->Right click on property->Advanced System Setting-> Environment variable
Click new under System variable
This will open New System Variable Dialog. Type JAVA_HOME in Variable Name and Type JDK’s installation directory (i.e c:\Program Files\Java\jdk1.7.0_2) of your computer in Variable Value.
Now write the same path under the system variable, look for a variable called Path and click on Edit.
In the Edit System Variable dialog, append the following to the end of the field Variable value:
;%JAVA_HOME%\bin
Click Ok, again Ok, ok, and close it.
Now-Again type following in Command,
javac -version
You will able to see a version.
Congratulation, you successfully installed the java development environment on your computer.