Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Comparing two .jar files

How do I compare two .jar files? Both of them have compiled .class files.

I want the difference in terms of method changes, etc.

like image 926
Kunal Avatar asked Oct 06 '10 00:10

Kunal


People also ask

How can I compare two jar files?

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.

How do I compare two jars in beyond 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.

How do I compare war files?

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.

How do I unpack a jar file?

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.


1 Answers

  • JAPICC, sample usage:

    japi-compliance-checker OLD.jar NEW.jar

    Sample reports for log4j: http://abi-laboratory.pro/java/tracker/timeline/log4j/

    enter image description here

  • PkgDiff, sample usage:

    pkgdiff OLD.jar NEW.jar

    See sample report for args4j.

    enter image description here

  • Clirr, sample usage:

    java -jar clirr-core-0.6-uber.jar -o OLD.jar -n NEW.jar

like image 93
linuxbuild Avatar answered Oct 04 '22 11:10

linuxbuild