How to change Java version for Maven in IntelliJ?

后端 未结 8 2050
情书的邮戳
情书的邮戳 2020-12-05 01:43

I\'m new to both Maven and IntelliJ IDEA.

I have a Maven project written in Java 8. Whenever I try to build it (Maven Projects window -> Lifecycle -> compile -> Run

8条回答
  •  借酒劲吻你
    2020-12-05 02:14

    I don't think any response to the question addressed the concern - ". . . in IntelliJ".

    Here are the steps: -

    • Go to Preferences in IntelliJ ( or Shortcut ⌘ + ,)
    • Build, Execution, Deployment > Maven > Importer - select the "JDK for Importer" dropdown then select your preferred java version, Click Apply
    • Build, Execution, Deployment > Maven > Runner - select the "JRE" dropdown then select your preferred java version, Click Apply
    • Click OK

提交回复
热议问题