By updating the Windows PATH environment variable we can allow easier access to command line tools through the command prompt.

  1. Navigate to Control Panel | System and Security | System | Advanced system settings.
  2. A System Properties window will appear; in this window, select the Advanced tab and click on the Environment Variables button to open the environment variables window.
  3. Now, click on the New button in the System variables panel, enter the name for your new tool as the variable name, such as JAVA_HOME, and enter the path to the tool as the variable value, such as C:\Program Files\Java\jre1.8.0_25. 
  4. Double-click on the PATH variable entry. This will open an Edit System Variable window.
  5. Edit the Variable value of Path by appending the ;%JAVA_HOME%\bin text to its existing value.
  6. Now click on the OK button