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

后端 未结 10 669
逝去的感伤
逝去的感伤 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:46

    I also got the same error. Reason for that I was compiling the project using Maven. I had JAVA_HOME pointing to JDK7 and hence java 1.7 was being used for compilation and when running the project I was using JDK1.5. Changing the below entry in .classpath file or change in the eclipse as in the screenshot resolved the issue.

    classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5
    

    or change in the run configuarions of eclipse as

提交回复
热议问题