java.lang.UnsupportedClassVersionError: bad major version at offset=6

試著忘記壹切 提交于 2019-11-28 12:06:27

You have essentially compiled your code with JDK 1.6 but running it with Java 5 - Just ensure a Java 6 runtime.

Even I faced same problem. The problem is inappropriate class version, for ex. compiling with different jre.

Solution: IF you are using Eclipse or RAD, set change compiler setting as per your requirement and also change same setting to project configuration by clicking on "Configure Project specific setting". Windows->Preferences->Compiler-> click on link "Configure Project specific setting".

For me the fix was to set the JAVA_Home system variable to the correct path.

It is a compiler issue. Make sure all your modules are configured with java 1.5 as a compiler. Window-->preference--> Java --> Compiler. Make sure 1.5 is selected.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!