Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Tool:CFR

From ReverseEngineering.wiki
Tool
Developer Lee Benfield
License MIT
Website https://github.com/leibnitz27/cfr
On this wiki Facts · Code · Notes · Topics

CFR (MIT, Lee Benfield) is a Java decompiler written in Java 6 that handles modern Java features up to at least 14 and tries other JVM languages too.

Overview

The README says CFR decompiles modern Java features, including much of Java 9, 12 (switch expressions) and 14 (instanceof patterns), is written entirely in Java 6 so it runs anywhere, and makes a decent attempt at class files from other JVM languages. Run java -jar cfr.jar Name.class or a jar path with --outputdir dir; --help lists options. Binaries are on GitHub releases (since 0.145) and Maven Central.

Failure modes

The README documents none beyond the issue policy (do not attach copyrighted material). At commit c4145259dfcd8ad3e99004e4d9ecb0aed55dcc5a, src/org/benf/cfr/reader/bytecode/analysis/structured/statement/StructuredFakeDecompFailure.java (lines 16-31) emits a block comment, not a // comment: "This method has failed to decompile. When submitting a bug report, please provide this stack trace...", then the exception text and, optionally, its stack trace, followed by throw new IllegalStateException("Decompilation failed");. The comment holds the exception, not the bytecode. util/getopt/OptionsImpl.java line 470 defines recover (default true: "Allow more and more aggressive options to be set if decompilation fails") and silent (line 466); comments (line 392) controls the status comments.

Related

Technique:Choosing a decompiler, Tool:Vineflower, Tool:JADX.

Sources

Code & repositories

  • https://github.com/leibnitz27/cfr @ c4145259dfcd8ad3e99004e4d9ecb0aed55dcc5a · license: MIT (read from LICENSE; GitHub's API was busy)
    CFR Java decompiler
    Tested on: source read, not run: not run; README read · checked 2026-10-18