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

后端 未结 30 2614
盖世英雄少女心
盖世英雄少女心 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:12

    I tried all of the above, however, still getting the same error message.

    In my case an actual JRE was incorrectly used as JRE System Library in the project-specific build path which was obviously overriding all those other settings discussed here.

    If that is so in your case try the following:

    1. Open the project-specific libraries of the Java Build Path: Right-click "Project > Build Path > Configure Build Path..." and select "Libraries" tab.
    2. Select the "JRE System Library" entry and hit "Remove".
    3. Hit "Add Library...".
    4. A wizard pops up. Select "JRE System Library" and hit "Next >".
    5. Now select the correct JDK (in my case "Workspace default JRE", which I configured using a JDK).
    6. Close wizard by hitting "Finish".
    7. Close "Properties" dialog by hitting "OK".

提交回复
热议问题