how to set path for java in windows 10

https://‮.www‬lautturi.com
how to set path for java in windows 10

To set the path for Java in Windows 10, follow these steps:

  1. Open the Start menu and search for "Environment Variables".
  2. Click on "Edit the system environment variables" button.
  3. In the "System Properties" window, click on the "Environment Variables" button.
  4. In the "Environment Variables" window, scroll down to the "System variables" section and find the "Path" variable.
  5. Click on the "Edit" button.
  6. In the "Edit Environment Variable" window, click on the "New" button.
  7. Type the path to the Java installation directory, for example: C:\Program Files\Java\jdk1.8.0_251\bin
  8. Click "OK" to close the window.

You should now be able to use the java and javac commands from any command prompt or terminal window.

Note: Make sure to restart any open command prompts or terminal windows for the changes to take effect.

If you are having trouble finding the Java installation directory, you can try searching for the java.exe file on your computer. The directory where the java.exe file is located is the Java installation directory.

You can also check the value of the JAVA_HOME environment variable, which should be set to the Java installation directory. To do this, open a command prompt and type echo %JAVA_HOME%. This will print the value of the JAVA_HOME environment variable. If the JAVA_HOME variable is not set, you can set it by following the steps above and creating a new environment variable with the name JAVA_HOME and the value set to the Java installation directory.

Created Time:2017-11-01 20:43:00  Author:lautturi