电脑装了jdk8,JAVA_HOME也是设置的8.
不删除8变回7.
改了JAVA_HOME,并且path值里的C:\ProgramData\Oracle\Java\javapath也删了
运行java -version,报错
Error: Registry key ‘Software\JavaSoft\Java Runtime Environment’\CurrentVersion’
has value ‘1.8’, but ‘1.7’ is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
solution
1. 打开开始菜单,搜索regedit,打开注册表
2. 打开”HKEY_LOCAL_MACHINE”
3. 点击”SOFTWARE”
4. 点击”JavaSoft”
5. 点击”Java Runtime Environment”
6. 选中”CurrentVersion” ,右键点击更改,改成”1.7”
问题解决了