Fatal error compiling: tools.jar not found:
Solution 1
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
Click on the small black arrow and then Run Configurations
After, you just put clean install in your Maven goal, like this :
And then, try to run your compilation, and we will see what happens... :)
Solution 2
You need to put the right Java Build path for your project.
In Eclipse:
--> Right click the project name - Properties (keyboard shortcut: [Alt] + [Enter] )
--> Libraries
--> Change the JRE7 to JDK7.
And I think the problem will be solved that way ;)
Related videos on Youtube
Uppi
Updated on December 26, 2020Comments
-
Uppi over 3 years
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?
-
khmarbaise almost 10 yearsDi you try to run the build on command line?
-
Uppi almost 10 yearsyes..its working fine in command line.
-
MikeJRamsey56 about 8 yearsOne more place to check is the JRE tab on the Maven Build Run Configuration window.
-
Manish Kumar over 4 yearsEven i faced this issue. It was a eclipse config problem related to JRE. sudotutorials.com/java/870/…
-
-
Uppi almost 10 yearsDont see a libraries section when hit alt+enter!!!
-
Valentin Montmirail almost 10 yearsOk, so : right-click on your project, and then, properties
-
Uppi almost 10 yearsI found the java build path Valentin, but It shows all the project jar files. I did change the path to JDk in the preferences->java->installed jre->jdk...But its not helping
-
Uppi almost 10 yearsYes I DId. Now it shoes this error.Posted in the Question
-
Uppi almost 10 yearsAll the build runs fine in the command prompt, But not sure exactly the problem with eclipse.
-
Valentin Montmirail almost 10 yearsOK you should configure your run configurations if the problem change to this :) Your maven goal should be something like : clean install
-
Uppi almost 10 yearsI was showing a bunch of errors yesterday.An internal error occurred during: "Loading descriptor for xxx.". org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'taglib' not found. (platform:/resource/xxx/src/main/webapp/WEB-INF/web.xml, 226, 11). This was one of the errors yesterday
-
Uppi almost 10 yearsThis was an other one..Could not get the value for parameter encoding for plugin execution default-resources Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 (
-
Uppi almost 10 yearsHTTP Status 404 - /xxx/ and also has a unhandled event loop exception->plugin> org.eclipse.ui in the error log... :|
-
Valentin Montmirail almost 10 yearsO.o OK maybe you have a proxy or something, and your maven don't succeed to download packages... :/ maven.apache.org/guides/mini/guide-proxies.html
-
Uppi almost 10 yearsI dont have a settings.xml file under my repository!!!
-
JavaTec about 8 yearsI had to create a JAVA_HOME variable within eclipse (go to preferences -> java -> build path -> class path variable) and point this to JDK7 - it started to work
-
JGFMK over 6 years@JavaTec Better to add Windows -> Preferences....