javaintellij-idea

Intellij executes with wrong java version


My Project is set to run with Java 11. enter image description here

I can build it without any issues, but when I try to run it, it is looking for Java 1.8 enter image description here

Running on Mac OS 12.2.1 IntelliJ Version 2021.3.2


Solution

  • The problem was in the run configuration. I needed to specify the java version as well. Thanks for the suggestions