Is there a tool that we could use to compare two Jars at Binary/Byte code level?

11k Views Asked by At

The idea is to compare two jars and see if they were generated from same source and compare if they're identical at Binary/Byte code level. Also if they're both compiled with the same compiler i.e. Eclipse JDT or JIT etc compiler.

I've looked at Apache Common BCEL, but it only does comparison after decomposing the original byte-code into source code and then it compares it like diff tool; that compares text line-byline, but what I would like is to compare the byte-code without being decomposed/rearranged to source code and then compare.

I was looking at how we could compare straight binary/byte code comparison!!!!

Free tools/API recommendation would be good :) Ta

2

There are 2 best solutions below

1
On

I like to use Beyond Compare (beware that it is not a free application)

http://www.scootersoftware.com/

2
On

you may try any of these following jar comparator tool as based on yours requirement..

extradata-product free for personal use

zardiff on sourceforge.

japi-compilance-checker os based

pkgdiff