Idea creates Maven error: Java error:release version 5 not supported(mac)

Time:2020-9-22

Create Maven project in idea and run the program with error

  1. Error:java:error:release version 5 not supported
    Idea creates Maven error: Java error:release version  5 not supported(mac)
  2. Error:java:Source option 5 is no longer supported.Use 6 or later
    Idea creates Maven error: Java error:release version  5 not supported(mac)

Both of the above problems are due to the wrong version selected in a local configuration. Follow the steps below to check one by one
Idea creates Maven error: Java error:release version  5 not supported(mac)