Maven in Eclipse complains that “Unable to locate the Javac Compiler” whenever POM changed

后端 未结 12 794
后悔当初
后悔当初 2020-12-05 07:25

I got error message every time I changed my pom.xml in eclipse.

Build errors for myapp; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to ex         


        
12条回答
  •  悲哀的现实
    2020-12-05 08:04

    None of the above worked for me but when I followed the following steps, the problem went away.

    • Go to Window -> Preferences -> Java -> installed JREs
    • Select the JRE you are using (Should be the one inside jdk. Ex: C:\Program Files\Java\jdk1.6.0_25\jre)
    • Press Edit -> Add External JARs...
    • Browse to Java\jdk1.6.0_25\lib and select tools.jar and Press Enter
    • Press Finish and OK

提交回复
热议问题