Skip to content
constnulledPublic

About

A cli java decompiler with a choice of 4 decomplier engines.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jfx-cli - Command line Java Decompiler

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 engines

--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.

Download

Get the latest .jar from the Releases page of this repository.

Requirements

Java runtime version 25 or newer.

Usage

java -jar jd-cli.jar [options] [Files to decompile]

Examples

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:

  • .class file: 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.

Options

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

Building

Requires JDK 25 and Maven.

mvn clean package

The runnable jar with all dependencies is created at jd-cli/target/jd-cli.jar.

Using as a Maven dependency

Credits

This project was originally forked from JDCommandLine and jd-cli.

License

  • 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).

About

A cli java decompiler with a choice of 4 decomplier engines.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages