1.分别安装jdk1.7和jdk1.8.
2.配置环境变量
3.删除环境变量"Path", 把"C:/ProgramData/Oracle/Java/javapath"去掉.
PS:这是1.8新增加的,在此目录下,会有3个exe的快捷方式java.exe、javaw.exe、javaws.exe
4.在"C:WindowsSystem32"下找到java.exe、javaw.exe和javaws.exe删掉