eclipse中pom.xml配置文件第一行错误,错误信息为:Missing indirectly referenced artifact com.sun:tools:jar:1.5.0:system
是因为需要jdk的tools。根本原因是没有指定javaw.exe的的位置,在eclipse.ini中用-vm指定javaw的位置就可以了。
下面是:
第一种解决方案 修改eclipse.ini中的内容:
-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
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
com.genuitec.myeclipse.product
--launcher.XXMaxPermSize
-vm
c:"Program Files"Java"jdk1.6.0_18"bin"javaw.exe
512m
-vmargs
-Xms256m
-Xmx512m
-Duser.language=en
-XX:PermSize=256M
-XX:MaxPermSize=512M
第二种解决方案 添加profiles
配置pom.xml文件
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>3.0.5.RELEASE</spring.version>
<java.home>jdk路径</java.home>
</properties>
<profiles>
<profile>
<id>default-tools.jar</id>
<activation>
<property>
<name>java.vendor</name>
<value>Sun Microsystems Inc.</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>system</scope>
<systemPath>${java.home}/lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
-
第三种解决方案使用命令安装
- mvn install:install-file -Dfile=tools.jar -DgroupId=com.sun -DartifactId=tools -Dversion=1.5。0 -DgeneratePom=true -Dpackaging=jar
- 在pom中配置普通依赖
-
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>provid</scope>
<type>jar</type>
</dependency>
- 第四种解决方案
-
- 直接项目上右键import然后选maven下的一个install选项,导入jdk目录下的那个tools.jar。
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>provid</scope>
<type>jar</type>
</dependency>
分享到:
相关推荐
Special Report on Gene Therapy Companies, K. K. Jain. Chichester: Wiley, 2000....directly or indirectly involved in gene therapy. Informa- tion on these companies was prepared by summarizing pu
The type org.apache.tools.ant.Task cannot be resolved. It is indirectly referenced from required .class files错误....., 解决办法:在工程中加入此jar包
The type org.xmlpull.v1.XmlPullParser cannot be resolved. It is indirectly referenced from required .class files报错时导入xmlpull_1_0_5.jar
It is indirectly referenced from required .class files 调试Reflact时,Eclipse一直提示The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files。...
The type com.google.j2objc.annotations.ReflectionSupport$Level cannot be resolved. It is indirectly referenced from required .class files
The type org.apache.tools.ant.Task cannot be resolved. It is indirectly referenced from required .class files 部署openfire4.2.1
The type org.springframework.dao.DataAccessException cannot be resolved. It is indirectly referenced from required .class files 解决方法: 导入spring-tx-4.2.2.RELEASE.jar包。
validation-api-2.0.0.Final.jar 主要用于支持Maven项目,缺失可引起以下异常The type javax.validation.Payload cannot be resolved. It is indirectly referenced from required .class files
Special Report on Gene Therapy Companies, K. K. Jain. Chichester: Wiley, 2000....directly or indirectly involved in gene therapy. Informa- tion on these companies was prepared by summarizing pu
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use ...
jaxrpc.jar下载 The type javax.xml.rpc.ServiceException cannot be resolved.It is indirectly。。。用于webServices 的 客户端和服务端的解析 工具
It is indirectly referenced from required .class > ★BasicNameValuePair cannot be resolved to a type > ★HttpPost cannot be resolved to a type > ★NameValuePair cannot be resolved to a type > ★...
- ADD: Delphi/CBuilder XE4 now supported. - ADD: Delphi/CBuilder XE3 now supported. - ADD: Delphi/CBuilder XE2 now supported. - ADD: Delphi/CBuilder XE now supported. - ADD: Delphi/CBuilder 2010 now ...
The type org.springframework.dao.DataAccessException cannot be resolved. It is indirectly referenced异常缺少的包
VecMath库的核心类之一就是`Matrix3d`和`Matrix4d`,它们分别代表3x3和4x4的矩阵。这两个类提供了丰富的矩阵操作方法,如初始化、复制、加法、减法、乘法以及矩阵的转置。此外,它们还支持矩阵的乘法运算,这在处理...
1. **做出共同努力** (make joint efforts): 这个词组强调的是团队协作和共同努力,适用于描述合作项目或解决问题的情境。 2. **综合素质** (comprehensive quality): 在教育领域,这个词组通常用来评价一个人全面...
in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or ...
operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a ...