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

相關文章
相關標籤/搜索