先安装jdk 1.7,在安装jdk1.8
删除"C:\Windows\System32"下快捷方式java.exe、javaw.exe、javaws.exe
配置好环境变量
JAVA_HOME = C:\Program Files\Java\jdk1.7.0_79
(JAVA_HOME = C:\Program Files\Java\jdk1.8.0_121)
CLASSPATH = .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar
添加Path = ;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;
删除Path中"C:/ProgramData/Oracle/Java/javapath"