Could not find artifact com.sun:tools:jar:1.5.0 解决办法

Could not find artifact com.sun:tools:jar:1.5.0 解决办法

创建maven项目出现错误Could not find artifact com.sun:tools:jar:1.5.0 解决方法:

错误如下:

Java代码 

  1. find artifact com.sun:tools:jar:1.5.0 at specified path   
  2. E:/Java/jre6/../lib/tools.jar -> [Help 1][ERROR]   
  3. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.  
  4. [ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR]   
  5. [ERROR] For more information about the errors and possible solutions,   
  6. please read the following articles:[ERROR] [Help 1]   

解决办法:

Window -> Preferences -> Java -> Installed JREs, 点击"Add"按钮,选择默认的"Standard VM", 点击"Next >", 点击"JRE home"右边的"Directory"选择文件夹E:\Java\jdk1.6.0_38,一路“确定”,回到"Installed JREs"界面,在刚添加的"jdk1.6.0_38"打上勾。

再选择目录树中的"Execution Environments", 点选界面左侧的"J2SE-1.5",然后在右侧点选"jdk1.6.0_38"。如下图



 

重启Eclipse,一切OK了。

另外,在eclipse.ini文件中加了两行(一定要加在-vmargs之前,而且-vm后面有回车):

-vm
E:/Java/jdk1.6.0_38/bin/javaw.exe

转载于:https://my.oschina.net/leblancs/blog/798896

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值