Adding items to your PATH system variable is one of those routine programmer activities – especially in Windows where many program installers don’t usually do this for you. So here is a quick tutorial on adding items to your PATH.
1. What is the PATH Variable?
The PATH variable is a list of directories which is searched through when a command is executed with no explicitly given location. So if you are in a random directory and you type the command “java”, then the operating system will search the current directory for a program of that name. If none is found, it will then search through all the directories in the PATH variable for the program.
2. Where is PATH set?
In Windows, the PATH variable is set in the advanced system settings. These settings can be found by right-clicking on computer, selecting “properties” and then selecting “Advanced system settings”
Then on the “Advanced” tab, click on the “Environmental Variable” button. A window will pop up and the global system PATH variable will be in the System Variables list.
Select “Path” from the list and click edit. At THE END of the text given in “Variable Value”, add a directory to include in the path – such as where Java is installed. Do not remove anything else from the path variable unless you know exactly what you are removing from it. Also ensure you add a semi-colon “;” character between the last directory and the one you are adding. Click OK and you are done. If your command terminal was already open, then close it and open it again for the changes to take effect.