安装Maven后提示找不到JDK的错误 。The Maven Integration requires that Eclipse be running in a JDK
2015-11-03 17:30
721 查看
安装Maven后提示找不到JDK的错误
。The Maven Integration requires that Eclipse be running in a JDK
Posted on 2010-07-25 22:36 itVincent 阅读(6551) 评论(0) 编辑 收藏 所属分类: maven 在eclipse中安装了m2eclipse(maven插件)
在安装后,出现下列警告:
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.
解决:
(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.
相关文章推荐
- Java并发编程 之 线程池核心ThreadPoolExecutor
- spring4 maven3 mybatis
- struts2 数据传输问题---“POST方式提交数据量过大,在后台接收不到数据”问题的解决
- java 自带的消息队列
- Java类中继承与初始化
- spring 的配置详解
- java各种类型转化的转载集合 慢慢添加
- Elasticsearch - Java API(与集群交互)
- SpringMVC单文件上传、多文件上传、文件列表显示、文件下载
- 17-MyEclipse快速定位文件的方法
- Java 反转单向链表
- Java Web应用中的任务调度
- 从”JAVA“而终 N/:易混淆知识点大全
- Spring集成ActiveMQ
- MyEclipse 6.5安装maven插件
- Mongo spring 查询指定字段
- Use Spring @Scheduled To Achieve Timing Task
- spring mvc 中web.xml配置信息解释
- java.lang.IllegalArgumentException: Unknown entity: cn.ibeans.web.model.User
- Java开发中的23种设计模式详解(转)