How to configure Java environment variables under win7/win8.1/win10 system Java environment variable configuration tutorial introduction

  

Java environment variable configuration tutorial:
1, first Baidu search "JDK", enter the official website to download the development kit;

2, in this case download the standard version of the development kit, click “accept license agreement” agree agreement;

2, then click the corresponding version under the corresponding system, automatically enable download tool download;

3, installation requires a custom installation directory, such as commonly used Under the work space. After installation, a separate jre (running environment) will be installed and installed in the same directory;

4, start to configure environment variables, right click on the desktop computer <;properties", then click on the left side“ Advanced System Settings & rdquo;, click on the default tab of the default advanced tab, "Environment Variables";

5. Click the "System Variable" Named "JAVA_HOME" (without quotes), the variable value is similar to the jdk directory in the Java installation directory, you can find the jdk directory under the installation directory, copy the path directly to determine;

6, find the "system variable" under the "system variable", click the "Edit" button;

7, click on the variable value, the mouse pointer to the first place, add input “ %JAVA_HOME%bin;” (without quotes, English semicolon), this sentence means to dynamically call the newly created "JAVA_HOME" variable value (jdk path), add “bin” is to finally find in this directory Java compilation tool .
Remarks: The meaning of setting environment variables is that you can use the tools under bin in any directory. If you do not configure Java environment variables, you must enter cm in the bin directory to use them.
You can also add the complete bin path to the path variable value to complete the Java environment variable configuration.
Note: The advantage of creating a new variable is that once the Java directory is changed or the JDK on the USB flash drive is used on a different computer, you only need to change the value of the new variable without changing the path value. After all, the path variable involves many software configurations. Operation should be cautious, and its operation should be minimized;

8, confirm the completion of the settings, close the window, "win+r", run the input "cmd", enter "ld"; java” or “ Javac” Enter, without error, the environment variable configuration is successful.

The above is the introduction of the configuration tutorial of Java environment variables under win7/win8.1/win10 system. Follow the above steps step by step, I hope to help you.

Copyright © Windows knowledge All Rights Reserved