IDEA: javac: source release 1.7 requires target release 1.7

后端 未结 18 1292
青春惊慌失措
青春惊慌失措 2020-11-22 06:26

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

\"enter

How can I correc

18条回答
  •  醉梦人生
    2020-11-22 07:09

    I found another way to run into this error. You can get this if you have been re-organizing your directory structure, and one of your poms is pointing to the old parent which no-longer configures javac (because that configuration was moved to a middle level). If this happens the top level defaults to 1.5 and the misbehaving lower level pom inherits it.

    So another thing to check when you see this error is that your pom structure is matching your directory structure properly.

提交回复
热议问题