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

安装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配置文件, 增加以下代码:

  1. -vm
  2. 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~2

3. 在文件中的位置, 不能放到最后(不能在-vmargs之后), 不放心的直接放到文件最前, 如:

  1. -vm
  2. C:\Progra~2 \Java\jdk1. 6 .0_16\jre\bin\javaw
  3. -startup
  4. .....
  5. --launcher.defaultAction
  6. openFile
  7. -vmargs
  8. -Dosgi.requiredJavaVersion=1.5
  9. -Xms240m
  10. -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"即可,注意空格。

时间: 2024-10-28 15:19:46

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

Eclipse is running in a JRE, but a JDK is required 解决方法

本文非原创,转自http://liguoliang.com/2010/eclipse-is-running-in-a-jre-but-a-jdk-is-required/ 安装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. 分两步解决问题:

Eclipse is running in a JRE, but a JDK is required

安装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 JRE

Eclipse解决方案之"Eclipse is running in a JRE, but a JDK is required"

Open the eclipse folder and edit the eclipse.ini file: Please check if the file has the -vm parameter, if not, then add it. -vm C:\Program Files\Java\jdk1.6.0_10\bin\javaw.exe Note: It should be add before the -vmargs parameter. See my eclipse.ini, j

Maven编译失败,提示No compiler is provided in this enviroment. Perhaps you are running on a JRE rathen a JDK ?

用maven对项目进行构建时,提示No compiler is provided in this enviroment. Perhaps you are running on a JRE rathen a JDK ?错误,如下图 出现此错,只需要将JRE home指定为jdk(jdk目录本身自带jre)安装目录,再次用maven构建项目即可,如下图示 更为详细的步骤可以参考如下博客:https://blog.csdn.net/lslk9898/article/details/73836745 原

[转]在Eclipse整合Maven3.6.3插件导入maven项目并编译时,控制台提示No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

近日有同事遇到在编译Maven项目时出现[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?的问题, 原以为这是个个例, 源于同事粗心, 配置环境出问题造成, 后到百度查看一下, 遇到这个问题的不在少数, 但是对问题的解释没有说到根源, 于是写下这篇博客供大家参阅, 如有纰漏, 还请指正.错误代码节选: [ERROR] COMPILATION

eclipse Maven操作出现No compiler is provided in this environment.Perhaps you are running on a JRE rather than a JDK?

右键 pom.xml -> Run as -> Maven install 后出现类似如下错误: 解决方法: 1)选择项目后,点击 eclipse 导航栏中 [Window]-->[Prefrences]-->[Java]-->[Installed JREs]-->Add 选择[Standard VM]---> [Next > ]选择JDK的安装目录确定. 出现如下页面后,点击[Directory ...]选择jdk的安装目录 -->[Finish]

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

控制台输出的错误信息如下: [INFO] Scanning for projects... [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ----------------------------------------------------

Eclipse安装Maven后JRE警告

问题现象: Eclipse按装maven插件之后,每次启动Eclipse都会弹出: Eclipse is running in a JRE, but a JDK is required Some Maven plugins may not work when importing projects or updating source folders. 问题原因: 从提示信息上看,就是说Eclipse是运行在JRE环境中,但Maven插件需要JDK环境. 根本原因是eclipse没有使用JAVA_

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 问题

maven编译项目时出错,提示信息如下: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1: Compilation failure [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 在Eclipse的菜单中,进入 Windo