Using idea and maven to configure the compiled version of jdk

Confusion of jdk compiled version

Due to the pursuit of version stability and legacy of old projects, we often have to switch the compiled version of JDK at any time, which is a stranger to the latest jdk11. We have been criticized for forgetting to use the idea switch of different versions of JDK for a long time

Several ways to configure jdk with idea and maven

  • The first maven global setting configuration
  • The second configuration of pom in maven project


  • File - > setting - > java compiler in idea
  • File - > project structure - > modules in idea

The summary is as follows

  • The first one is global configuration, and profile switching is convenient
  • The second is the configuration in the current project. Other projects are not affected, and the priority is higher than the profile

Tags: Programming Maven JDK Java Apache

Posted on Wed, 06 May 2020 07:49:02 -0700 by banjax