Skip to content

Add CFR Java decompiler plugin for .class file comparison#3242

Merged
sdottaka merged 1 commit intoWinMerge:masterfrom
Gaurav-pasi:feature/cfr-java-decompiler-plugin
Mar 10, 2026
Merged

Add CFR Java decompiler plugin for .class file comparison#3242
sdottaka merged 1 commit intoWinMerge:masterfrom
Gaurav-pasi:feature/cfr-java-decompiler-plugin

Conversation

@Gaurav-pasi
Copy link
Contributor

Adds a new DecompileJVM unpacker plugin that uses CFR (Class File Reader) to decompile .class files into readable Java
source code, enabling meaningful line-by-line comparison of compiled Java classes.

This complements the existing DisassembleJVM plugin (javap bytecode output) by providing human-readable Java source
output instead of raw bytecode instructions.

The plugin appears under Plugins > Unpacker > Decompilation > "Decompile Java (CFR)" and outputs .java files for
comparison. It also works with .class files inside JAR archives.

Changes:

  • Plugins/Commands/CFR/cfr.bat - Launcher script with auto-download support for CFR 0.152
  • Plugins/Commands/CFR/URL.txt - Source URLs
  • Plugins/Plugins.xml - New DecompileJVM plugin entry
  • Docs/Manual/English/Plugins.xml - Plugin documentation

Adds a new DecompileJVM plugin that uses CFR (Class File Reader) to
decompile .class files into readable Java source code, enabling
meaningful line-by-line comparison of compiled Java classes. This
complements the existing DisassembleJVM plugin (javap bytecode) by
providing human-readable Java source output.
@sdottaka sdottaka merged commit 130b53a into WinMerge:master Mar 10, 2026
@sdottaka
Copy link
Member

Thank you for the PR.
I will merge it for now.
One thing I noticed is that the downloaded file is not verified against the SHA256 value, so I may add a checksum verification later.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new WinMerge Unpacker plugin that decompiles JVM .class files into Java source using the CFR decompiler, enabling more readable comparisons than the existing javap bytecode disassembler.

Changes:

  • Registers a new DecompileJVM plugin entry for .class files that outputs .java.
  • Adds a cfr.bat command wrapper (with auto-download) plus URL metadata.
  • Documents the new plugin in the English manual.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
Plugins/Plugins.xml Adds the DecompileJVM plugin definition and wires it to the CFR command wrapper.
Plugins/Commands/CFR/cfr.bat Adds the CFR launcher script with on-demand download behavior.
Plugins/Commands/CFR/URL.txt Adds upstream URLs for CFR download/source.
Docs/Manual/English/Plugins.xml Adds manual documentation for the new DecompileJVM plugin.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants