eclipse添加maven后报错:Eclipse is running in a JRE, but a JDK is required

错误提示:

Eclipse is running in a JRE, but a JDK is required  Some Maven plugins may not work when importing projects or updating source folders.

 

解决方法:分三个步骤

第一步:确认用的是JDK,操作如下

确定正在使用的是JDK,而非JRE。如果没有JDK,通过Add按钮添加一个Standard VM.

 

第二步:修改eclipse.ini配置文件

  解决路径中有空格的问题,用 Progra~1 代替 Program Files ,Progra~2 代替 Program Files(x86)

原配置文件:

 

修改后的配置文件:

 

第三步:重启eclipse。

posted @ 2013-04-24 23:47  xwj_smile  阅读(146)  评论(0)    收藏  举报