Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I used to work with BeyondCompare and it was able to compare *.class files by configuring it to run a decompiler before comparison.

Is there something like that for WinMerge? Or a plug-in that can do it instead?

share|improve this question
up vote 7 down vote accepted

I have spent the day writing a DLL plugin for Winmerge to do this - it isn't the world's greatest thing, but it gets the job done.

Takes the filename, splits it into directory and class name, then calls javap for each class file. It is rather slow unfortunately (javap's fault I'd say).

I have put the DLL here:

Absolutely no licence, warranty, etc. No trojans or virii either. I will get around to cleaning up the source and putting it up somewhere (probably with the winmerge project people).

Create a "MergePlugins" directory where your winmerge executable is and put the dll in there. It is automatically activated on *.class files.

The hardest part was working out how to launch javap, windows programming is just so awful.

It would be nice if winmerge compared the files before unpacking them to see if they are different - that would save a bit of time. Maybe this can be accomplished in the plugin somehow but as I said I really just hacked this together as quick as I could.

Oh I should mention you will need javap on your path.

EDIT: Source code is here: Built using visual studio 2005 - Adapted from DisplayBinaryFiles plugin which is available with winmerge source package.

share|improve this answer
Thanks - I missed the notification about this answer, i just saw it now. I really appreciate your effort - I'll test it ASAP :) – RonK Oct 26 '11 at 20:45
to enable automatic diffing (upon double clicking), do this (Plugins > Automatic Unpacking) - WinMerge 2.14.0 – Gary Tsui Jan 7 '14 at 10:22
@GaryTsui thanks, but what I mean is that in the list view (say you compare a whole folder of class files) it will show class files as different, even though upon unpacking they are identical. I think this comes about because they can have binary differences (due to recompilation etc) however the method/field signatures have not changed. When comparing two binary APIs for example, you have to check every different class manually, when you double click on it you will be met with "the files are identical" or similar, even though they were marked as different in the list! – Wayne Uroda Jan 13 '14 at 10:58
great trick .. you save my night :) – Yajli Maclo Jan 16 at 15:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.