'JDK version mismatch between Intellij project structure and Maven version

At project structure of Intellij, the JDK version is selected as 1.8

At Maven properties also, the JDK verison had been mention as 1.8

But still upon mvn --install somehow I get JDK verion as 11

Unable to understand the behaviour. And how do I make it as 1.8

Project screenshot

enter image description here



Solution 1:[1]

Try and change in Settings -> Build, Execution, Deployment -> Build Tools -> Maven -> Runner -> JRE to use JDK 8 or even better set the JAVA_HOME to the JDK 8

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tamir Hazut