maven compile not fount tools.jar

Maven – Fatal error compiling: tools.jar not found
By Muruganantham Mani15 October, 20124 Comments
You might quite experience the tools.jar not found when trying to compile using Maven.  This is because when you do the compilation, maven is trying to look for a tools.jar which is not available for the compilation and hence you get this exception.
Error
Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre6\..\lib\tools.jar -> [Help 1]
Resolution:
Make sure, you have the JDK in the installed JRE and selected for your compilation needs.
In Eclipse,
Goto Windows -> Preferences
Java -> Installed JREs – > Execution Environment
JavaSE1.x -> JDE 1.x

Eclipse Preferences
If you don’t have the JDK in the Installed JRE, then
Select the Installed JRE and Add the JDK installed path


RELATED POSTS:
Maven Bundle – OSGI – An Internal Error Occurred – Opening Resource
Maven Dependency Scopes
org.apache.xerces.dom Deferred Document Impl getXmlStandalone Exception

你可能感兴趣的:(compile)