`
yangzb
  • 浏览: 3520919 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

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

    博客分类:
  • Java
阅读更多

Eclipse 安装了Maven插件,启动Eclipse 后,提示错误信息:

Maven integration for Eclipse JDK Warning 300x134  m2eclipse: Eclipse is running in a JRE, but a JDK is required

解决方法:

First… install JDK if you don’t have it.

And then…

set your JDK as a default Java environment in eclipse (default installed JRE)

Open eclipse. Click on ‘Window’ -> ‘Preferences’ -> ‘Java’ -> ‘Installed JREs’.

If you can’t find any JDK on the list -> click ‘Add’ -> ‘Standard VM’ -> set all paths and click ‘Finish’.

After that – check this JDK on the list of installed JREs and click ‘OK’.

add path to your SDK in eclipse.ini

open ‘eclipse.ini’ and add there:

?
1
2
3
4
-vm
 
path_to_javaw_on_your_machine
< pre >

so in my example it will be (jdk1.6.0_17 on Windows):

?
1
2
3
-vm
 
C:\Progra~1\Java\jdk1.6.0_17\jre\bin\javaw

Notice 1: Do not use paths with spaces! Replace all dir names with spaces to their shortcuts. For example: ‘Program Files’ is ‘Progra~1′.
Notice 2: ‘-vm’ is in the first line, path is in the second line

My full ‘eclipse.ini’ looks like this:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
-startup
 
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
 
--launcher.library
 
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
 
-showsplash
 
org.eclipse.platform
 
--launcher.XXMaxPermSize
 
256m
 
-vm
 
H:\Progra~1\Java\jdk1.6.0_17\jre\bin\javaw
 
-vmargs
 
-Xms40m
 
-Xmx256m
分享到:
评论

相关推荐

    maven 常用命令集合

    * 安装好 m2eclipse 插件后,可能会报错: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配置maven

    如果在安装过程中遇到Eclipse报错,提示"Eclipse is running in a JRE, but a JDK is required",这意味着Eclipse正在使用JRE而非JDK运行。解决这个问题,你需要确保Eclipse配置中使用的是JDK。在“Window”-&gt;...

    Maven插件安装使用说明

    &gt; Eclipse is running in a JRE, but a JDK is required &gt; &gt; Some Maven plugins may not work when importing projects or updating source folders. 这通常是因为Eclipse运行在JRE上而不是JDK上,导致某些Maven...

    Maven建立多模块项目-图文并茂--入门级别.doc

    - **Eclipse 启动问题**:安装 m2eclipse 插件后,Eclipse 可能会出现提示“Eclipse is running in a JRE, but a JDK is required”。解决方法是在 Eclipse 的启动参数中指定 JDK 的位置。 - 在 `-vm` 参数前添加 `...

    maven报错积累文件

    当Eclipse启动提示“Eclipse is running in a JRE, but a JDK is required”时,需要在Eclipse的启动参数中指定JDK路径。这通常在Eclipse的启动配置(eclipse.ini)文件中完成,确保`-vm`参数设置在`-vmargs`之前,...

    maven3的安装配置和使用说明

    - 如果遇到 Eclipse 显示的警告信息“Eclipse is running in a JRE, but a JDK is required”,可以通过以下步骤解决: - 检查 Eclipse 正在使用的 JRE 版本:`Window` -&gt; `Preferences` -&gt; `Java` -&gt; `Installed ...

Global site tag (gtag.js) - Google Analytics