How do I compare two .jar files? Both of them have compiled .class files.
I want the difference in terms of method changes, etc.
Depending on your system settings, you should be able to just double click the jar file to run it, or right-click and select to run it. Then the tool will prompt for the two files to compare.
Double clicking on a war file in Beyond Compare's folder compare will expand it as a folder because war files are essentially zip files. To decompile Java class files to source code in Beyond Compare, install the Java Class to Source file format.
It should be easier if you unzip them first and then compare folders. Then you can use WinMerge to compare the 2 folders. Show activity on this post. WAR files are basically Zip files.
JAR files work just like ZIP files. You can use any archive program to extract them. On Windows, you can Install WinRAR 7-Zip, or WinZIP. Macs have their own built-in archive program called Archive Utility.
JAPICC, sample usage:
japi-compliance-checker OLD.jar NEW.jar
Sample reports for log4j: http://abi-laboratory.pro/java/tracker/timeline/log4j/
PkgDiff, sample usage:
pkgdiff OLD.jar NEW.jar
See sample report for args4j.
Clirr, sample usage:
java -jar clirr-core-0.6-uber.jar -o OLD.jar -n NEW.jar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With