Run the Java program on the server today. The result is always incorrect. Then, check the JDK installation and enter "Java-version" on the command line to find that the output is jdk1.7, I configured jdk1.6 in the path, so jdk1.6 should be output. I checked it on the Internet and found that windows first searches for the command in the current path and then searches for it according to the path in the path, Because JRE will put the Java command in C during installation: /Windows/system32 directory (do not believe to check it), and you happen to put the JDK path behind C:/Windows/system32, when executing the Java command in the command line, it may not be as expected. The solution is to modify the PATH variable and put the JDK path at the beginning. This solves the problem.
In addition, after JDK is installed and variables are configured, eclipse can directly decompress it. However, if you have installed Multiple JDK, in window-preference-JRE, you 'd better check which JDK version is used for your eclipse.
Reference: http://wdqzxcww.blog.163.com/blog/static/175261162201192592355316/