Eclipse is running in a JRE, but a JDK is required Some Maven plugins may not work when importing pr
Posted 茉莉的诉说
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Eclipse is running in a JRE, but a JDK is required Some Maven plugins may not work when importing pr相关的知识,希望对你有一定的参考价值。
安装Maven后每次启动出现警告信息:
Eclipse is running in a JRE, but a JDK is required
Some Maven plugins may not work when importing projects or updating source folders.
分两步解决问题:
1. 检查Eclipse正在使用的JRE
‘Window’ -> ‘Preferences’ -> ‘Java’ -> ‘Installed JREs’ 确定正在使用JDK而非JRE.
如果没有JDK, 则先新增一个Standard VM.
2. 配置Eclipse.ini
检查Eclipse配置文件, 增加以下代码:
- -vm
- C:\Progra~2 \Java\jdk1. 6 .0_16\jre\bin\javaw
注意事项:
1. 第一行参数名称, 第二行为值, 不能写到同一行中
2. 关于第二行的值, 因为不允许出现空格, 所以使用Progra~1或2 替代”Program Files (x86)”.
如果在Program Files下, 请使用Progra~1, 如果在x86下, 则使用Progra~23. 在文件中的位置, 不能放到最后(不能在-vmargs之后), 不放心的直接放到文件最前, 如:
- -vm
- C:\Progra~2 \Java\jdk1. 6 .0_16\jre\bin\javaw
- -startup
- .....
- --launcher.defaultAction
- openFile
- -vmargs
- -Dosgi.requiredJavaVersion=1.5
- -Xms240m
- -Xmx912m
3. 重启Eclipse, 警告不再出现.
注意:在win7下面,myeclipse的快捷方式会覆盖eclipse.ini的配置,
将快捷方式->目标中的"D:\Program Files (x86)\eclipse\eclipse.exe" -vm "D:\Program Files (x86)\jre\bin\javaw.exe" -clean
的-vm "D:\Program Files (x86)\jre\bin\javaw.exe" 删除或者替换为-vm "C:\Java\jdk1.6.0_04\jre\bin\javaw.exe"即可,注意空格。
以上是关于Eclipse is running in a JRE, but a JDK is required Some Maven plugins may not work when importing pr的主要内容,如果未能解决你的问题,请参考以下文章
eclipse菜单栏不显示 + the system is running in lou-graphics mode问题
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK Mav
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK问题解决
Intel HAXM is required to run this AVD. VT-x is disabled in BIOS.