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

后端 未结 12 777
后悔当初
后悔当初 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 07:54

    This worked for me too :

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

提交回复
热议问题