3
votes

I tried mvn clean install in Intellij. But it raise this error. image 1

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

1
The JAVA_HOME environment variable is most likely explicitly set by IntelliJ - Thorbjørn Ravn Andersen
Then should it be JAVA_HOME/bin when i set path to only JDK? - Lahiru Gamage
No, Maven uses JAVA_HOME internally. That IntelliJ sets it for the shell in its terminal, does not mean that it is also set outside. - Thorbjørn Ravn Andersen
It works when using command prompt when i sets JAVA_HOME but not in terminal. - Lahiru Gamage

1 Answers

1
votes

It worked when I set JAVA_HOME and use command prompt for executing mvn clean install. The problem with the IntelliJ is we can't add bin path of the JDK. Is there a way to solve this? Image