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

错误以下:eclipse

Java代码 maven

  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]   

解决办法:spa

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

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



 

重启Eclipse,一切OK了。blog

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

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

相关文章
相关标签/搜索