A command line Java decompiler with a choice of decompiler engines. It decompiles single .class files, archives
(.jar, .war, .zip, ...) and directories of classes.
--decompiler value |
Engine |
|---|---|
jd (default) |
JD-Core |
cfr |
CFR |
Vineflower |
[Vineflower] |
procyon |
Procyon |
JD-Core is the oldest of them and can struggle with newer Java features (records, switch expressions, pattern
matching, sealed classes). For modern bytecode try cfr first. If one engine produces messy
output, run the same input with another one and compare.
Get the latest .jar from the Releases page of this repository.
Java runtime version 25 or newer.
java -jar jd-cli.jar [options] [Files to decompile]java -jar jd-cli.jar HelloWorld.class
java -jar jd-cli.jar app.jar
java -jar jd-cli.jar -dc cfr app.jar
java -jar jd-cli.jar -dc vineflower -od decompiled -sr app.jar
java -jar jd-cli.jar -dc procyon -n classes/Default output depends on the input type:
.classfile: printed to the console.jar/.zip/.war: written to a new archive named<name>.src.<ext>- directory: written to a new directory named
<name>.src
Output options can be combined, for example -od out -oc.
Usage: java -jar jd-cli.jar [options] [Files to decompile]
Options:
--decompiler, -dc
decompiler engine to use. Possible values are: jd, cfr,
fernflower, procyon
Default: JD
--displayLineNumbers, -n
displays line numbers in decompiled classes (jd and procyon only)
Default: false
--escapeUnicodeCharacters, -eu
escape unicode characters in decompiled classes
Default: false
--help, -h
shows this help
Default: false
--logLevel, -g
takes [level] as parameter and sets it as the CLI log level. Possible
values are: ALL, TRACE, DEBUG, INFO, WARN, ERROR, OFF
Default: INFO
--outputConsole, -oc
enables output to system output stream
Default: false
--outputDir, -od
takes a [directoryPath] as a parameter and configures a flat DIR output
for this path
--outputDirStructured, -ods
takes a [directoryPath] as a parameter and configures a structured DIR
output for this path
--outputZipFile, -oz
takes a [zipFilePath] as a parameter and configures ZIP output for this
path
--pattern, -p
RegExp pattern which the to-be-decompiled file has to match. Not matching
entries are skipped.
--serialProcessing, -sp
don't use parallel processing
Default: false
--skipResources, -sr
skips processing resources
Default: false
--version, -v
shows the version
Default: false
Requires JDK 25 and Maven.
mvn clean packageThe runnable jar with all dependencies is created at jd-cli/target/jd-cli.jar.
This project was originally forked from JDCommandLine and jd-cli.
- jfx-cli is licensed under GPLv3 as the original JD-Core library.
- Bundled decompilers keep their own licenses: JD-Core (GPLv3), CFR (MIT), Fernflower (Apache 2.0), Procyon (Apache 2.0).