---
title: "eclipse maven Missing indirectly referenced artifact com.sun:tools:jar:1.5.0"
author: "fengpy2009"
date: "2012-04-09T17:47:21Z"
tags: []
categories: ["编程语言"]
slug: "eclipse-maven-missing-indirectly-referenced-artifact-com-sun-tools-jar-1-5-0"
draft: false
lastmod: "2012-04-09T17:47:21Z"
id: 1480971
url: "https://fengpy2009.iteye.com/blog/1480971"
---

當使用eclipse的maven：出现Missing indirectly referenced artifact com.sun:tools:jar:1.5.0:system 错误，是因为需要jdk的tools。

根本原因是没有指定javaw.exe的的位置，所以在eclipse.ini中用-vm指定javaw的位置就可以了~一定要在 openFile 以下加才行，在別的地方加，都會無效~

-startup  
plugins/org.eclipse.equinox.launcher\_1.1.1.R36x\_v20101122\_1400.jar  
–launcher.library  
plugins/org.eclipse.equinox.launcher.win32.win32.x86\_1.1.2.R36x\_v20101222  
\-product  
org.eclipse.epp.package.jee.product  
–launcher.defaultAction  
openFile  
–launcher.XXMaxPermSize  
256M  
\-showsplash  
org.eclipse.platform  
–launcher.XXMaxPermSize  
256m  
–launcher.defaultAction  
openFile  
\-vm  
C:/java/jdk1.6.0\_21/bin/javaw.exe  
\-vmargs  
\-Dosgi.requiredJavaVersion=1.5  
\-Xms40m  
\-Xmx512m