Win10 installs two versions of jdk, how to configure environment variables and switch to use

1. First download and install 2 versions of jdk, such as jdk1.6, jdk1.7

2. Then configure the environment variables, My Computer-"Properties-" Advanced System Settings-"Environment Variables, and then create a new JAVA_HOME6 in the system variables, put the installation path of jdk1.6 here; create a new JAVA_HOME7, put jdk1 here. 7The installation path, and then create a new JAVA_HOME, put% JAVA_HOME *% here, and then this version you want to use, for example, if you want to use jdk1.7, that is% JAVA_HOME7%.

3. Create a new classpath, and the variable value is.;% JAVA_HOME% \ lib \ dt.jar;% JAVA_HOME% \ lib \ tools.jar Note that the English dots in front cannot be missed.

4. Add% JAVA_HOME% \ bin;% JAVA_HOME% \ jre \ bin after the path and click OK.

5. Then you can test, CMD command input: java -version to view the current jdk version
6. Put% JAVA_HOME% \ bin;% JAVA_HOME% \ jre \ bin; in the environment path 7. Put the environment in the front 7. Delete C: \ Windows \ System32 in the path. /// ------------ If this column is not available, it is unnecessary

Published 6 original articles · received 1 · views 383

Guess you like

Origin blog.csdn.net/qq_42857963/article/details/105468455