There are two ways to set path for jdk. First one is temporary and the second one is permanent. if you set path using temporary way, you will have to set path each time when you will open the command prompt. And if you once set the path permanently then there is no need to give set path command again ever on your system.
Here is the description of how to do it .
1) Open command prompt.
2) Change the current working directory to the folder where u have saved your java program. using the cd command.
3) give the command "set path=%path%;C:\Program Files (x86)\Java\jdk1.6.0_23\bin"
(The green part is the path of the bin folder and it may change computer to computer )
you have done!!!!!!!!!!!!!
For check out that you have done successfully , type the command "javac" and press enter. if the command is recognized means that you have set the path successfully.
This figure shows how to do it.
1) Go to the properties of the "My Computer".
2) Now go to "advanced system settings".
3) Click on "Environment Variable" tab
4) In the users variable click on "new" tab.
5) In the variable name type "path", and in variable value type the path of the bin folder.
as shown below :
6) Now click on OK > OK > OK.
you have done!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Here is the description of how to do it .
Setting temporary path:
just follow these steps :1) Open command prompt.
2) Change the current working directory to the folder where u have saved your java program. using the cd command.
3) give the command "set path=%path%;C:\Program Files (x86)\Java\jdk1.6.0_23\bin"
(The green part is the path of the bin folder and it may change computer to computer )
you have done!!!!!!!!!!!!!
For check out that you have done successfully , type the command "javac" and press enter. if the command is recognized means that you have set the path successfully.
This figure shows how to do it.
Setting permanent path:
Just follow these steps :1) Go to the properties of the "My Computer".
2) Now go to "advanced system settings".
3) Click on "Environment Variable" tab
4) In the users variable click on "new" tab.
5) In the variable name type "path", and in variable value type the path of the bin folder.
as shown below :
6) Now click on OK > OK > OK.
you have done!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

