HOW TO SET PATH ENVIRONMENT VARIABLE
Setting Path Environment Locally
You can use the command for setting the path of bin folder as below.
By this way there is no need to give the path again and again to the command prompt, now you can run the java program from anywhere, just you have to pass the path of java bin folder.
But this path is local to every command window so for every command window you have to set the path again and again.
When you open a new command window, you have to set the path again.
To get rid of this problem you can set the path environment variable globally in system.Once you set the path globally there is no need of setting it again.
Setting Path Environment Globally
By the following below steps you can set the path environment variable globally
After clicking the advance settings the following window will show and go with it.
Right click on My computer->Properties->advance settings->Environment variable->use variable->New->variable name(Give some name)->Variable value(put your bin folder path)->Press Ok.