Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 937
filip_j Avatar asked Jun 08 '26 06:06

filip_j


2 Answers

You have to check the following settings match (for Java 17):

enter image description here enter image description here enter image description here

Also if you use maven check that the correct version is set and if not, change them and reimport the project.

like image 165
pringi Avatar answered Jun 10 '26 21:06

pringi


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

like image 43
filip_j Avatar answered Jun 10 '26 21:06

filip_j



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!