Eclipse/Maven error: “No compiler is provided in this environment”

前端 未结 24 1312
庸人自扰
庸人自扰 2020-11-27 04:36

I am a relative newcomer to the world of Java enterprise development. My organization\'s Java guru is out on indefinite family leave, and I have been assigned the task of m

相关标签:
24条回答
  • 2020-11-27 04:57

    if you are working outside of eclipse in the command window
    make sure you have the right JAVA_HOME and that that directory contains the compiler by entering the following command in the command window:

    dir %JAVA_HOME%\bin\javac.*
    
    0 讨论(0)
  • 2020-11-27 04:59

    Go into Window > Preferences > Java > Installed JREs > and check your installed JREs. You should have an entry with a JDK there.

    https://cduu.wordpress.com/2013/03/08/maven-eclipse-compiler-error-no-compiler-is-provided-in-this-environment/

    0 讨论(0)
  • 2020-11-27 05:02

    check java version in pom.xml and jre version in Eclipse->Window->Preferences->Installed JREs. In my case pom.xml has different version(it had 1.8 while eclipse using 1.7). Fixing the version in pom.xml to 1.7 worked.

    0 讨论(0)
  • 2020-11-27 05:05

    In my case, I had created a run configuration and whenever I tried to run it, the error would be displayed. After searching on some websites, I edited the run configuration and under JRE tab, selected the runtime JRE as 'workspace default JRE' which I had already configured to point to my local Java JDK installation (ex. C:\Program Files (x86)\Java\jdk1.8.0_51). This solved my issue. Maybe it helps someone out there.

    0 讨论(0)
  • 2020-11-27 05:06

    was getting the same problem, pointed java to bin folder in eclipse using: windows > preferences > java > installed JREs > remove any existing JRE and point it to your java bin folder (mainly under C:\Program Files\Java\jdk1.8.x_xx).

    then run maven install it should work.

    0 讨论(0)
  • 2020-11-27 05:07

    1.Go to Windows-->Preferences-->Java-->Installed JREs-->Execution Environments

    2.select the java version you are using currently in the "Execution Environments" box. So that in the "Compatible JREs" box, you are able to see as "jre1.8.0_102[perfect match]"(if your java version is 1.8). Then try to build using maven.

    0 讨论(0)
提交回复
热议问题