/java-decompiler

A Docker image with four popular Java decompilers in one place (CFR, Fernflower, Krakatau, and Procyon) :rocket::hammer:

Primary LanguageShellISC LicenseISC

Java Decompiler

Have your decompilers ready when you need them most.

Java Decompiler combines the strength of popular Java decompilers, tailored for simplicity and efficiency.

License

📄 Usage

  1. Prepare Directories:

    • Create a directory ./infiles for the files you want to decompile.
    • Place any external libraries (in JAR format) into ./libfiles.
    • Set up an empty directory ./outfiles for the output.
  2. Run the Docker Image:

    For Linux and macOS:

    docker run \
        -ti \
        --rm \
        -v "$PWD/infiles:/infiles:Z,ro" \
        -v "$PWD/libfiles:/libfiles:Z,ro" \
        -v "$PWD/outfiles:/outfiles:Z,rw" \
        ghcr.io/rims-naps/java-decompiler:latest

    For Windows CMD:

    docker run ^
        -ti ^
        --rm ^
        -v "%cd%\infiles:/infiles:Z,ro" ^
        -v "%cd%\libfiles:/libfiles:Z,ro" ^
        -v "%cd%\outfiles:/outfiles:Z,rw" ^
        ghcr.io/rims-naps/java-decompiler:latest

    For Windows PowerShell:

    docker run `
        -ti `
        --rm `
        -v "${PWD}\infiles:/infiles:Z,ro" `
        -v "${PWD}\libfiles:/libfiles:Z,ro" `
        -v "${PWD}\outfiles:/outfiles:Z,rw" `
        ghcr.io/rims-naps/java-decompiler:latest

    For Podman users, replace docker with podman in the command.

💡 Background

This Docker image is equipped with the following Java decompilers:

Note: This version no longer supports APK decompilation. The focus is now solely on JAR files. The following tools have been removed:

  • Fernflower
  • Krakatau
  • jadx
  • Enjarify

The replaced tool is Vineflower instead of Fernflower.

⚠️ Acknowledgements

This project builds upon the work of the original developer, eikendev, who did the majority of the development. My contribution involved simplifying and optimizing the code to run more efficiently on lower-end hardware, focusing exclusively on JAR files.

For more details on the original tools and decompilation processes, refer to the original repository.