Search code examples
mavenbuild

Maven Build error TOOLS.JAR NOT FOUND IN JRE


I am getting this problem while building maven project .. please help me out..

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project Subs_Engine: Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre7\..\lib\tools.jar -> [Help 1]

Solution

  • If you're getting this in eclipse make sure that Eclipse is pointing to a JDK and Not a JRE.

    In Eclipse navigate to Window->Preferences->Java->Installed JRES- Add... Standard VM and point Directory... to a JDK. You'll obviously need to install a JDK if you have not done so.