Install Java11 on the basis of jdk8

Install jdk11 on the basis of jdk8

Recently, because the installation of neo4j requires a java11 environment, there is already jdk8 on the computer, and jdk11 must be installed, but there are a series of problems when configuring environment variables, which is explained here.

Since the installation version is downloaded from the official website, it is said that the installation version will automatically generate a path in the system variables in the environment variable
Insert picture description here
. Four commands such as javac.exe, the latter two are the commands used to install jdk8 (I don’t know why there are two paths to jdk8, maybe because I installed it twice before)

If you have the same situation as
Insert picture description here
me, I have configured the jdk11 path in the user variable in advance. The blog of csdn says that the priority of the user variable path is higher than the system variable. It stands to reason that I don’t need to care about system variables at all. Setting, direct cmd input command java -version will pop up the version information of jdk11, but the above situation occurs. In this case, the most trouble-free way is to delete all the javapath paths of system variables directly, so that the system can be based on users The path set in the variable is correctly searched.
Insert picture description here
In addition, if you want to switch the environment of jdk8, set
Insert picture description here
it in the user variable and then set %JAVA_HOME%\bin in the path of the user variable.
Note that every time you run cmd, you must cross off the previously opened DOS window and perform the test again, otherwise the updated configuration cannot be displayed correctly in the previous DOS window.

Guess you like

Origin blog.csdn.net/Meloneating/article/details/113525739