Class file has wrong version 52.0, should be 50.0

前端 未结 6 2457
有刺的猬
有刺的猬 2020-11-29 10:21

I\'m trying to compile my project in IntelliJ idea. I\'m using a class in an external jar file and on compilation receiving the above error.

I understand that it\'s

6条回答
  •  生来不讨喜
    2020-11-29 10:42

    It means your Java runtime version is 1.8, but your compiler version (javac) is 1.6. To simply solve it, just retreat the Java version from 1.8 to 1.6.

    But if you don't want to change the Java runtime version, then do the following steps:

    1. JAVA_HOME= "your jdk v1.8 folder path", to make sure jdk is also v1.8 and use java -version and javac -version again to ensure it
    2. Make sure IntelliJ 's compiler mode is set to compliant with v1.6 But i have tried that. it didn't solve my problem.

提交回复
热议问题