Add new system variable with a name JAVA_HOME and value – your path to Java, in my case, it’s C:\Program Files\Java\jre-9.0.4 and press “OK”. Then press “Edit…” for Pathsystem variable and add new path %JAVA_HOME%\bin or change already existing path to Java. We set Java home and Java path variables, let’s check is it really work.
path | Microsoft Docs Sets the command path in the PATH environment variable, specifying the set of directories used to search for executable (.exe) files. If used without parameters, this command displays the current command path. Adding a directory to the PATH environment variable in Windows set – A command that changes cmd's environment variables only for the current cmd session; other programs and the system are unaffected. PATH= – Signifies that PATH is the environment variable to be temporarily changed. Complete list of environment variables on Windows 10
In Windows, the PATH variable can be found in your Environment Variables in the Control Panel. I'm no expert on the subject, but I can describe it by using Python as an example. When you install Python 3 on your machine, you need to add it to the PATH (its an option in the installation, I believe).
Complete list of environment variables on Windows 10 Jun 22, 2020 Recognized Environment Variables (Windows 10) - Windows
Add A Directory To A PATH Environment Variable On Windows 10
Add Python to the Windows Path | Python To add the path to the python.exe file to the Path variable, start the Run box and enter sysdm.cpl: This should open up the System Properties window. Go to the Advanced tab and click the Environment Variables button: In the System variable window, find the Path variable and click Edit: Setup ADB and Fastboot to be used anywhere on your Windows Aug 27, 2017 How to Set the PATH System Variable for Windows