在常量池中获取无效的字节标记:19 [英] getting Invalid byte tag in constant pool : 19
本文介绍了在常量池中获取无效的字节标记:19的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在创建一个Web服务,并收到类似org.apache.tomcat.util.bcel.classfile.ClassFormatException的错误:常量池中的无效字节标记:19. 我正在使用tomcat 8.0,而java versoin是1.8.0.152.
i am creating one webservice and getting error like org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19. i am using tomcat 8.0 and java versoin is 1.8.0.152.
推荐答案
标记类型为19的常量池条目是模块描述符;请参见 JVM规范表4.4-A 一个>.我认为您已尝试在使用Java 9(或更高版本)编译器编译的类上使用BCEL:
A constant pool entry with tag type 19 is a module descriptor; see JVM spec table 4.4-A. I think you have attempted to use BCEL on a class compiled with a Java 9 (or later) compiler:
- 您使用的BCEL版本不了解该标签.
- 该类无论如何都不会在Java 8 JVM中加载.模块仅在Java 9中引入,并且对于Java 8 JVM,类文件的主要版本号应该太新了.
这篇关于在常量池中获取无效的字节标记:19的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文