J
J
Jake Taylor2021-06-01 22:51:06
Maven
Jake Taylor, 2021-06-01 22:51:06

Why does Intellij Idea use a different version of Java than the one in Maven?

There is a project with Maven, in pom.xml it is written to use version 8 of Java (everything was done according to the instructions in the documentation ):

<properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>


But when the project starts, this is displayed on the console:
"C:\Program Files\AdoptOpenJDK\jdk-11.0.11.9-hotspot\bin\java.exe"

And for some reason, the 11 version of Java is also in the project structure:
60b68fa201ef2253247115.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nuby, 2021-06-02
@Nuby

11 is specified in the JRE settings.
Run-Edit Configurations

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question