There are many tutorials on Baidu about the configuration of environment variables, but it is indeed not easy for me to complete this step, so I decided to share the configuration method here.
1. Install jdk/jre.
The official website has installation files. If you are careful, you can install it successfully. You can customize the installation path, but be careful not to have a Chinese path during installation, otherwise an error will be reported.
2. Open this computer and select properties.
3. Select Advanced System Settings.
4. Select environment variables.
5. Operation in the system variable bar
Select the new variable and create two variable names: Java_Home and ClassPath
ClassPath corresponds to input variable value.;%Java_Home%/bin;%Java_Home%/lib/dt.jar;%Java_Home%/lib/tools.jar
Java_Home corresponds to D:/Program Files/Java/jdk1.8.0_171 (this file address can be obtained by browsing the directory).
Finally, edit the existing system variable Path
After creating in the edit box, directly enter %JAVA_Home%/bin and %JAVA_Home%/jre/bin.
6. Inspection
win+r open and run, type cmd, and confirm that it is opened.
After opening, enter javac and java -version. If the interface shown in the figure below appears, it means that the configuration is successful.
Finish! !
Summarize
The above is a tutorial diagram of the Win10 eclipse configuration environment variables introduced to you by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message. The editor will reply to you in time!