No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

后端 未结 30 2640
盖世英雄少女心
盖世英雄少女心 2020-11-22 15:40

I\'m compiling a project in Eclipse using m2eclipse. I set the JDK path in Eclipse like this:

Windows-->preferences-->installed jres--> jdk1.7.xx  p         


        
30条回答
  •  甜味超标
    2020-11-22 16:30

    In Windows 7 - 64 bit, there is a permissions problem which prevents the installer from unpacking the file C:\Program Files\Java\jdk1.6.xx\lib\tools.jar into your local. This jar file is what maven-compiler-plugin version 3.x uses instead of the usual javac

    Solution: Run, as an administrator, the Java JDK installer! And make sure the tools.jar is sitting in the C:\Program Files\Java\jdk1.6.xx\lib\

    In case you are using m2e maven integration plugin, you want to see the file is visible to Eclipse via the following steps inside Eclipse:

    Go to Window -> Preferences -> Java -> installed JREs Select the JDK you are using (C:\Program Files\Java\jdk1.6.xx) Press Edit to see the list of jars including tools.jar, OR you can add it as Add External JAR Then configure the maven run through these steps:

    Run->Run configurations->Fill in Name, Base directory and Goals. Then in the same window move to the JRE tab and point to the JDK \jdk1.6.xx\

提交回复
热议问题