java - How can I decompile many jars at once? -


well, guess subject says :)

the ideal solution find jars within folder (they might in sub-folders), , write sources found single "src" directory, of course maintaing package folders.

concrete use case: decompile eclipse plugin jars

download jad decompiler.

  • unjar jar files (using command jar xvf) directory. let's call ${unjar.dir}.

  • create directory jad write out decompiled sources. let's call ${target.dir}.

  • execute following command:

    jad -o -r -sjava -d${target.dir} ${unjar.dir}/**/*.class 

options are:

-o       - overwrite output files without confirmation -r       - restore package directory structure -s <ext> - output file extension (default: .jad) 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -