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

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

    For me, nothing worked until I made this change to my pom.xml:

    
    ...
        
        ...
            
                maven-compiler-plugin
                3.1
                
                    true
                    C:\Program Files\Java\jdk1.7.0_45\bin\javac.exe
                
            
        
    
    

    Other Notes

    I could see that m2e was executing in a JRE, not the JDK. Nothing I did changed this, including adding this to the eclipse.ini:

    -vm
    C:\Program Files\Java\jdk1.7.0_45\bin\javaw.exe
    

    In the end I never got m2e to execute in a JDK, but setting the Java compiler explicitly (as above) did the trick.

提交回复
热议问题