java.lang.UnsupportedClassVersionError: Bad version number in .class file?

后端 未结 10 734
逝去的感伤
逝去的感伤 2020-11-22 12:56

I am getting this error when I include an opensource library that I had to compile from source. Now, all the suggestions on the web indicate that the code was compiled in o

10条回答
  •  北荒
    北荒 (楼主)
    2020-11-22 13:39

    changing the project to use java 1.7: For this to work follow those steps :

    • Change Compiler Compliance Level
    • Change your projects JRE/JDK to something of the same level(1.7 in my case)
    • Do the same change in all the projects referenced by your project
    • Change your run/debug configuration to use the JRE/JDK (or of the same level)

    Not working?

    • delete projects Bin directory
    • Clean
    • reBuild

    Still not working?

    in your project's directory: edit .settings/org.eclipse.jdt.core.prefs > make sure your target level is applied

    Good Luck!

提交回复
热议问题