First , How to configure two installed JDK on a single computer
First, prepare the path for the two JDK. Start the following steps:
1) Create a new two sub-java_home system variable in the system variable summary:
1. variable name : java_home8
variable Value : ' Path to JDK 1.8 '
2. variable name : java_home7
variable Value : ' Path to JDK 1.7 '
2) Create a new variable java_home for switching versions:
1. variable name :java_home
variable Value :%java_home8%(change to%java_home7 with 1.7)
Complete diagram:
3) Create a new classpath in the user's environment variable, and if not, create a new
classpath=.; %java_home%\lib;%java_home%\lib\tools.jar (Note: Add ' after value '; ' If the previous steps are consistent with my copy past the line
4) Add a variable to the system environment variable PATH:
%java_home%lib\dt.jar\%java_home%\lib\tools.jar\
5) configuration in path in user environment variable
%java_home%\bin;\%java_home%\jre\bin;\ (add to the front)
Note: Running use can only have one JDK, because there can only be one you, cannot simultaneously exist a high you and a short one. (Accept your rebuttal, study QQ e-mail: [email protected])
can also refer to this big guy's:53607248
Second,JAVA can use Javac cannot use the solution
https://jingyan.baidu.com/article/d8072ac468bc1dec95cefddb.html Great God website
How to configure two JDK configurations and Javac solutions for a single computer