Activity Workshop


Jarcomp is a comparison tool for Jar files and Zip files. It's free and cross-platform.

If you have two jar files or two zip files, it will show you what the differences are in the contents. It shows which files have been added, which have been removed, and which are present in both archives. If a file is found in both, it will tell you whether the file has grown bigger or been reduced in size, or if it's the same size in both. If it's the same size, an md5 checksum can be made for both files to see whether they're really the same contents or just the same size.

This tool is based on java, so you'll need a java runtime (at least version 5) in order to run it.

Jarcomp screenshot

Screenshot from a Linux system showing
comparison of two jars


The screenshot to the right shows an example of comparing two jar files. The two files (subsequent builds of Prune) are summarized at the top, showing the file sizes in bytes and the number of files within each one. Below this the comparison is summarized, saying whether the files have the same size or not, and whether the contents are the same or not. Note that it's possible for two jars to have the same size but different contents, and also to have different sizes but identical contents.

In the table, each file is shown and the status of whether the file has changed or not between the two archives. Files may have been added, removed, or present in both files. Files may have changed size, in which case the size change in bytes is shown in the third column of the table.

In this example, the files and GpsPruner.class have the same size in both files, but nevertheless the files are different - this was deduced by pressing the "Check Md5 sums" button to calculate all the Md5 checksums of the files within each archive. Therefore for these two files the status is not "=" (meaning identical), but "Changed sum", indicating that the size is the same but the contents are not identical.


Jar file

Runnable code plus source code (48 kb)
jarcomp_01.jar - Complete tool including source code


Before you run it, download the jar file above and save it to your machine.

This checker tool runs using a standard java gui. 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.

You can also run it from the command line, just by giving the path to the jarcomp.jar file:

java -jar jarcomp_01.jar

Or you can also give it the two files to compare straight away:

java -jar jarcomp_01.jar file1.jar file2.jar