Java 7 JVM VerifyError in Eclipse

こ雲淡風輕ζ 提交于 2019-11-27 19:00:46

Bug 353467 speaks about "using -XX:-UseSplitVerifier to activate the old verifier".
That is consistent with the JDK TM 6 Adoption Guide which describes that option as:

Traditional verifier can be forced with the -XX:-UseSplitVerifier flag.

Missing or incorrect StackMapTable attributes for version 50.0 class files can result in VerifyError exceptions.
Tools that rewrite bytecode in version 50.0 class files and do not correctly update the StackMapTable may fail to verify and trigger exceptions.

So the comment from 2011-10-03 does point out that:

AspectJ now auto activates the previously optional setting to create stackmaps if the classes are Java7.

pauwel

When I had this problem, I fixed it by deleting my JDK 1.7 system libraries from the project, and added the 1.6 JDK libraries instead. I went to run the project again, and I didn't get the error. When I added the JDK 1.7 libraries in again, it still works, so something in the 'swapping' makes it work.

I hit this problem in Juno, but resolved it by installing the latest 4.2 version from the 4.2 update site here:

http://www.eclipse.org/ajdt/downloads/

That's the same one @VonC gave a year ago -- but since the updated AspectJ is there now (but not in the latest Juno repository nor with what is shipped with Spring), it now constitutes an answer.

But credit to @VonC.

Note that this should work for 3.8 as well as 4.2.

currently, my environments is jdk 1.7(j2sdk 1.7 update 21) with eclipse 4.2 juno (SR2) I had same problem, so I had fixed it which configured VM arguments Option '-XX:-UseSplitVerifier' but it has ocurred big trouble when I will deploy product based on google-app-engine.

finally I changed java 6 (update 43)

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