Sunday, September 22, 2013

Most frequently used jad command options as a batch file.

jad and jd-gui are usually used to decompile java classes.
When using jad, all the class files in the directory structure need to be decomplied at once.
So I wrote a batch file working in the cmd window of Windows environment.

Copy the following lines and save them as jad.bat.
Run jad.bat with the only argument, the target directory name. All the class files should be unzipped under the target directory in advance.

@echo off
if x%1x == xx (
        echo .
        echo Usage:
        echo ....................................
        echo         jad.bat "target_dir"
        echo ....................................
        goto :eof
)
.\jad -o -d %1 -r -s java %1/**/*.class

You don't need to remember all the options of jad and don't need to revisit them every time you try.
You can write down the script for *nix family easily.

Thanks.

No comments:

Post a Comment