When we are working on maven project then several time we get an error
Could not find artifact com.sun:tools:jar:1.5.0 at specified path
We have several ways to solve this issue,You can follow any one which solve your issue,
I have added some solution in sequence as I preferred
1)- Modify location of jre in eclipse
Right click on your project --> Properties --> Select Java Build Path --> Click on Libraries Tab -->
Double click on Jre System Library --> Click on installed Jre (A pop will open) --> Double click on check jre --> change JRE Home from C:\Program Files\Java\jre6 to C:\Program Files\Java\jdk1.6.0_27
That's it surely solve your problem without changing anything in you project configuration.
2)- Change in project POM
you can also add dependency for tool jar , You can use below clip for this purpose
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>C:\Program Files\Java\jdk1.6.0_27\lib\tools.jar</systemPath>
</dependency>
I will add others method also after some time,
Could not find artifact com.sun:tools:jar:1.5.0 at specified path
We have several ways to solve this issue,You can follow any one which solve your issue,
I have added some solution in sequence as I preferred
1)- Modify location of jre in eclipse
Right click on your project --> Properties --> Select Java Build Path --> Click on Libraries Tab -->
Double click on Jre System Library --> Click on installed Jre (A pop will open) --> Double click on check jre --> change JRE Home from C:\Program Files\Java\jre6 to C:\Program Files\Java\jdk1.6.0_27
That's it surely solve your problem without changing anything in you project configuration.
2)- Change in project POM
you can also add dependency for tool jar , You can use below clip for this purpose
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>C:\Program Files\Java\jdk1.6.0_27\lib\tools.jar</systemPath>
</dependency>
I will add others method also after some time,
No comments:
Post a Comment