[size=medium]Eclipse maven has following error:
Missing artifact com.sun:tools:jar:1.5.0[/size]
Eclipse use "C:\windows\system32\javaw.exe" as default JVM, of course cant find tools.jar.
[size=medium]Solution I:[/size]
Modify eclipse.ini which in the eclipse.exe directory, add the following configuration:
[b][color=darkblue]-vm
D:\Program Files\Java\jdk1.6.0_37\bin\javaw.exe[/color][/b]
Note:
1. -vm cannot have a space behind;
2. the first line is parameter, and the second line is the value, need to separate.
3. This configuration is in the front of the file best.
[size=medium]Solution II:[/size]
PS: here, <profiles> and <dependencies> must be sepreated, or it cant solve the problem.
Missing artifact com.sun:tools:jar:1.5.0[/size]
Eclipse use "C:\windows\system32\javaw.exe" as default JVM, of course cant find tools.jar.
[size=medium]Solution I:[/size]
Modify eclipse.ini which in the eclipse.exe directory, add the following configuration:
[b][color=darkblue]-vm
D:\Program Files\Java\jdk1.6.0_37\bin\javaw.exe[/color][/b]
Note:
1. -vm cannot have a space behind;
2. the first line is parameter, and the second line is the value, need to separate.
3. This configuration is in the front of the file best.
[size=medium]Solution II:[/size]
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.home>D:\Program Files\Java\jdk1.6.0_37</java.home>
</properties>
<profiles>
<profile>
<id>default-tools.jar</id>
<activation>
<property>
<name>java.vendor</name>
<values>Sun.Microsystems Inc.</values>
</property>
</activation>
</profile>
</profiles>
<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>
PS: here, <profiles> and <dependencies> must be sepreated, or it cant solve the problem.