Configure the Java environment variable under Win7: Since JDK1.5, there's no need to configure classpath anymore, so it's a lot easier.
If you already have the JDK installed
The first step is to put the mouse on the computer click on the right button to select the properties, see the following interface
Click Advanced System settings, the following interface appears
Click on the following environment variable to appear below the interface
Click New to appear below the screen
The variable name is written on Java_home
The value of the variable is your Java installation path, for example, my content is written in D:\java.
After clicking OK, in the System Variables dialog box, the variable column finds the path as
Add%java_home%\bin at the top of the path variable value, then click OK and all the windows are clicked OK
It can also be added at the end of the value of the path variable, but also in the middle. But it feels convenient ahead.
After closing all windows, open the CMD command line and enter Java-version if it appears to indicate that the environment is configured successfully.
Configuration of Java environment variables under Win7