Fatal error compiling: tools.jar not found:

Uppi picture Uppi · Aug 7, 2014 · Viewed 102.7k times · Source

When compiling a project in Eclipse, I get below error:

Fatal error compiling: tools.jar not found:

How is this caused and how can I solve it?

Answer

Valentin Montmirail picture Valentin Montmirail · Aug 7, 2014

Goto Windows -> Preferences

Java -> Installed JREs –> Execution Environment

JavaSE1.x -> JDE 1.x


If you don’t have the JDK in the Installed JRE, then

Select the Installed JRE and Add the JDK installed path


Let's try to configure your run configurations to clean install

enter image description here

Click on the small black arrow and then Run Configurations

After, you just put clean install in your Maven goal, like this :

enter image description here

And then, try to run your compilation, and we will see what happens... :)