Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JarAnalyzer Error in Java 8+ JAR Files
Why am I getting an error from JarAnalyzer on JAR files generated by Java 8 and newer versions?
✍: FYIcenter.com
If you are using the JarAnalyzer 1.2 to analyze JAR files
generated by Java 8 and newer versions
you will get the following error:
> java -version java version "15" 2020-09-15 Java(TM) SE Runtime Environment (build 15+36-1562) Java HotSpot(TM) 64-Bit Server VM (build 15+36-1562, mixed mode, sharing) > runxmlsummary.bat /Users/fyicenter/jars Exception in thread "main" org.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 15 at org.apache.bcel.classfile.Constant.readConstant(Constant.java:146) at org.apache.bcel.classfile.ConstantPool.<init>(ConstantPool.java:67) at org.apache.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:222) at org.apache.bcel.classfile.ClassParser.parse(ClassParser.java:136) at com.kirkk.analyzer.framework.bcel.BCELClassFactory.getClass(Unknown Source) at com.kirkk.analyzer.framework.bcel.BCELPublicClass.<init>(Unknown Source) at com.kirkk.analyzer.framework.bcelbundle.JarBuilderImpl.buildJar(Unknown Source) at com.kirkk.analyzer.framework.bcelbundle.JarCollectionImpl.getJars(Unknown Source) at com.kirkk.analyzer.framework.bcelbundle.JarCollectionImpl.<init>(Unknown Source) at com.kirkk.analyzer.Analyzer.analyze(Unknown Source) at com.kirkk.analyzer.textui.XMLUISummary.createSummary(Unknown Source) at com.kirkk.analyzer.textui.XMLUISummary.instanceMain(Unknown Source) at com.kirkk.analyzer.textui.XMLUISummary.main(Unknown Source)
This is because the Apache BCEL library included in JarAnalyzer 1.2 is too old. It can not read class files generated by Java 8 and newer versions.
Solution -
1. Go to Apache Commons BCEL Website, and download bcel-6.5.0-bin.zip.
2. Unzip bcel-6.5.0-bin.zip and copy bcel-6.5.0.jar to JarAnalyzer "lib" sub-directory.
3. Update the runxmlsummary.bat script to replace bcel-5.2.jar with bcel-6.5.0.jar.
The ClassFormatException will go away.
⇒ Download JarAnalyzer Source Package
⇐ JarAnalyzer - Read XML Output
2021-07-01, 853🔥, 0💬
Popular Posts:
What Is ojdbc7.jar for Oracle 12c R1? ojdbc7.jar for Oracle 12c R1 is the JAR files of ojdbc.jar, JD...
maven-settings-builder-3 .8.6.jaris the JAR file for Apache Maven 3.8.6 Settings Builder module. Apa...
How to perform XML Schema validation with sax\Writer.java provided in the Apache Xerces package? You...
What Is javamail-1_2.zip? javamail-1_2.zip is the binary package of JavaMail API 1.2 in ZIP format. ...
Apache Log4j Core Implementation provides the functional components of the logging system. Users are...