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. With the file format installed, when you double click on a .class file inside a .war archive, it will display the decompiled source code in Beyond Compare's Text Compare.
Download page for file formats: http://www.scootersoftware.com/download.php?zz=kb_moreformatsv4
Note the Java class to source file format is only available for Windows, it isn't available for the Linux or Mac versions of Beyond Compare.
Answer from Chris Kennedy on Stack OverflowDouble 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. With the file format installed, when you double click on a .class file inside a .war archive, it will display the decompiled source code in Beyond Compare's Text Compare.
Download page for file formats: http://www.scootersoftware.com/download.php?zz=kb_moreformatsv4
Note the Java class to source file format is only available for Windows, it isn't available for the Linux or Mac versions of Beyond Compare.
Download Java Class to Source file format from http://www.scootersoftware.com/download.php?zz=kb_moreformatsv4
In Beyond Compare, pick Tools | Import Settings.
Fill in the downloaded filename, and click Next and proceed to finish.
Videos
How can I Compare CLASS (java class file)?
What browser should I use to Compare CLASS?
How long does it take to Compare CLASS?
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).
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.
Source, prebuilt DLL, and instructions here: https://gitlab.com/wayneuroda/winmerge-unpack-java-class-files
If comparing disassembled JVM bytecode (see my other answer) is not enough, maybe decompiling to Java source code might be more helpfulโฆ
After learning about the "currently undocumented" Plugins.xml (Plugins in the improved plugin system) as an alternative to sct and dll plugins, I have sucessfully "created" a plugin decompiling Java *.class files using procyon Java Decompiler in WinMerge 2.16.30.0:
- Create directory
%APPDATA%\WinMerge\MergePlugins, if it doesn't exist. - Create file
%APPDATA%\WinMerge\MergePlugins\Plugins.xml, if it doesn't exist.- Use
C:\Program Files\WinMerge\MergePlugins\Plugins.xmlas template removing<plugin>elements.
- Use
- Insert a custom
<plugin>with your path\to\procyon-decompiler.jar:
<?xml version="1.0"?>
<plugins>
<plugin name="MyDecompileJavaClass">
<event value="FILE_PACK_UNPACK" />
<description value="My JVM class decompiler with Procyon. 
Arguments: Command line options passed to the java command." />
<file-filters value="\.class$" />
<is-automatic value="false" />
<unpacked-file-extension value=".class.java" />
<extended-properties value="ProcessType=Decompilation;MenuCaption=My Decompile Java Class" />
<arguments value="A:\path\to\procyon-decompiler.jar" />
<unpack-file>
<command>cmd /c java -jar ${*} "${SRC_FILE}" > "${DST_FILE}"</command>
</unpack-file>
</plugin>
</plugins>
- Reload plugins (WinMerge menu command).
- If necessary, adjust the path to Procyon JAR (arguments) in WinMerge plugin settings.
- Use the new plugin for unpacking/comparing in WinMerge.