JAM JAM - 27 days ago 14
Java Question

IDEA: javac: source release 1.7 requires target release 1.7

When running a JUnit test, using IntelliJ IDEA, I get

enter image description here

How can I correct this?


  • Using SDK 1.7

  • Module language level is 1.7



Maven build works fine. (That's why I believe this in IDEA configuration issue)

Answer

Most likely you have incorrect compiler options imported from Maven here:

enter image description here