Version 1.7.0_79 of the JVM is not suitable for this product.Version:1.8【解决:】JDK1.8下载与安装
一、问题回顾
Version 1.7.0_79 of the JVM is not suitable for this product.Version:1.8 or greater is required.
大概的意思就是 jdk1.7 不能满足eclipse的运行,需要安装 jdk1.8 及以上的版本才可以。Windows+R 输入 cmd 打开命令行提示符,输入java -version 查看 jdk 版本,确实是 1.7 的,那么接下来就安装 1.8 的来解决一下问题。
二、登录官网下载
1、浏览器打开 https://www.oracle.com/index.html
2、点击左上角的更多图标,找到 Downloads,点击进去
3、下滑页面,找到 Java,点击进入;
4、点击 Java(JDK)for Developers;
最新版本是 JDK1.13 的,一般选择旧版本,因为旧版本比较稳定。
5、拖到最下面,找到 Java Archive,点击DOWLOAD进去就可以看到旧版本了。
我要下载1.8的,选择其中一个点击即可;
6、进入后勾选同意规则后,便可点击 jdk-8u231-windows-x64.exe 进行下载,下载需要登录,没账号自己注册一个就好了。
三、安装配置
1、安装
下载后找到安装路径,直接点开就是安装向导,一直下一步就可以了,其间可以看个人需求更改安装路径。
2、环境配置
(1)在【此电脑】右键打开属性
(2)点击【高级系统设置】
(3)点击【环境变量】
(4)在系统变量区域,点击新建。
(5)变量名:JAVA_HOME ,变量值为 jdk 的安装路径。
(6)新建变量名:CLASSPATH ,变量值: .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar
(7)找到Path变量,双击编辑 Path变量。
(8)点击新建,变量值为%JAVA_HOME%\bin ,并将它移到最前端,然后点击确定。
3、检验配置
1、Windows+R 输入 cmd 打开命令行提示符,输入java -version 后回车
2、再输入javac.exe命令。
这样 jdk1.8 的安装和配置就完成了。
四、修改配置文件
打开eclipse的安装目录,找到 eclipse.ini 文件
编辑修改,将1.7的那个删掉,换成1.8的保存。
再次打开eclipse,噗,又报错了
检查一下是高级配置的时候出问题了,改正过来就可以打开了。