Fatal error compiling: tools.jar not found: [closed]
Asked Answered
T

2

22

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?

Toledo answered 7/8, 2014 at 14:52 Comment(4)
Di you try to run the build on command line?Throb
yes..its working fine in command line.Toledo
One more place to check is the JRE tab on the Maven Build Run Configuration window.Geneviegenevieve
Even i faced this issue. It was a eclipse config problem related to JRE. sudotutorials.com/java/870/…Backsaw
C
42

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... :)

Choriamb answered 7/8, 2014 at 15:29 Comment(8)
Yes I DId. Now it shoes this error.Posted in the QuestionToledo
All the build runs fine in the command prompt, But not sure exactly the problem with eclipse.Toledo
OK you should configure your run configurations if the problem change to this :) Your maven goal should be something like : clean installChoriamb
I 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 yesterdayToledo
This 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 (Toledo
HTTP Status 404 - /xxx/ and also has a unhandled event loop exception->plugin> org.eclipse.ui in the error log... :|Toledo
O.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.htmlChoriamb
I dont have a settings.xml file under my repository!!!Toledo
C
23

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 ;)

Choriamb answered 7/8, 2014 at 15:1 Comment(5)
Dont see a libraries section when hit alt+enter!!!Toledo
Ok, so : right-click on your project, and then, propertiesChoriamb
I 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 helpingToledo
I 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 workBibi
@Bibi Better to add Windows -> Preferences....Bender

© 2022 - 2024 — McMap. All rights reserved.