解决安装了maven插件的myeclipse每次开启报错

The Maven Integration requires that Eclipse be running in a JDK, because a number of Maven core plugins are using jars from the JDK.

Please make sure the -vm option in eclipse.ini is pointing to a JDK and verify that Installed JRE’s are also using JDK installs.

我的解决办法:

Eclipse is running in a JRE, but a JDK is required 落雨 maven

  1. 是在 ‘Window’ -> ‘Preferences’ -> ‘Java’ -> ‘Installed JREs’.下增加一个jdk,注意是jdk不是jre

  2. 是在D:\Program Files\MyEclipse x.x\eclipse下的eclipse.ini里增加如下代码:

    【-vm C:\Program Files (x86)\Java\jdk1.6.0_10\bin\javaw.exe】 这行代码,注意vm后要换行

  3. 在myeclipse的快捷方式里面右键属性的目标里面最后面添加 vm参数:-vm "F:\java\jdk\jdk1.6.0_10\bin\javaw.exe"(这一步最关键)

  

 

-vm

C:\Program Files (x86)\Java\jdk1..0_10\bin\javaw.exe

-clean

-showsplash

com.genuitec.myeclipse.product.ide

--launcher.XXMaxPermSize

128m

-vmargs

-Xms128m

-Xmx256m

-Duser.language=en 

-XX:PermSize=256M 

-XX:MaxPermSize=256M

然后重启myeclipse就ok啦!

网上其他解决:

(1)设置系统安装的JDK目录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’.

(2)增加JDK路径到eclipse.ini文件中add path to your SDK in eclipse.ini

open ‘eclipse.ini’ and add there: -vm path_to_javaw_on_your_machine,so in my example it will be (jdk1.6.0_17 on Windows):-vm
D://Java/jdk1.6.0_13/jre/bin/javaw
不能有空格,否则要用~1代替,如: ‘Program Files’ is ‘Progra~1′. Notice 1: Do not use paths with spaces! Replace all dir names with spaces to their shortcuts. For example: ‘Program Files’ is ‘Progra~1′.
要分为2行写。Notice 2: ‘-vm’ is in the first line, path is in the second line

your ‘eclipse.ini’ looks like this:

-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
D:/Java/jdk1.6.0_13/jre/bin/javaw
-vmargs
-Xms40m
-Xmx256m
-vm要在-vmargs前面。Notice : ‘-vm’ must be  "-vmargs" above

重启eclipse。Restart eclipse and everything should be fine.

转自:http://blog.csdn.net/andyhong110/article/details/6163309

http://liguoliang.com/2010/eclipse-is-running-in-a-jre-but-a-jdk-is-required/

最新文章

  1. C++指针参数引用
  2. Hibernate
  3. 使用Spring Data JPA查询时,报result returns more than one elements异常
  4. 大型网站一致性的基础理论---CAP/BASE
  5. CSS3 animation 的尝试
  6. UDP SOCKET网络通信 C#
  7. React/React Native 的ES5 ES6写法对照表
  8. 【翻译】Ext JS最新技巧——2014-5-12
  9. sql的临时表使用小结
  10. Invitation Cards(邻接表+逆向建图+SPFA)
  11. C# 配置文件读取与修改(转)
  12. 作业:汽车查询--弹窗显示详情,批量删除 php做法(0521)
  13. IOS 定位服务与地图的应用开发
  14. 转:C++:从子类访问父类的私有函数
  15. UVA - 11082 Matrix Decompressing(最大流+行列模型)
  16. mac下安装maven
  17. 痞子衡嵌入式:第一本Git命令教程(4)- 转移(add/rm/mv)
  18. Yesterday when I was young
  19. char、nchar、varchar、nvarchar 的区别
  20. luogu P2962 [USACO09NOV]灯Lights 高斯消元

热门文章

  1. RedirectFromLoginPage和FormsAuthenticationTicket的区别
  2. Google推Android新开发语言Sky:流畅度 秒iOS
  3. C++ Iterator迭代器介绍及Iterator迭代器用法代码举例
  4. oracle表分区心得
  5. js 书写规范
  6. 对C#调用C++ dll文件进行总结
  7. Xamarin 实现android gridview 多选
  8. python 函数应用
  9. Python串行运算、并行运算、多线程、多进程对比实验
  10. centos架设FTP服务器