Well, I guess subject says it all :)
The ideal solution would find all jars within a certain folder (they might be in sub-folders), and write all the sources found into a single "src" directory, of course maintaing the package folders.
Concrete use case: decompile all Eclipse plugin jars
Download JAD Decompiler.
Unjar all your jar files (using the command jar xvf
) to some directory. Let's call this ${unjar.dir}
.
Create a directory for JAD to write out the decompiled sources. Let's call this ${target.dir}
.
Execute the 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)
http://java.decompiler.free.fr/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With