mavenintellij-ideamaven-compiler-plugin

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


I tried mvn clean install in Intellij. But it raise this error. enter image description here

mvn -version command works fine in the terminal of intellij.

enter image description here


Solution

  • It worked when I set JAVA_HOME and use command prompt for executing mvn clean install.