When One Java Decompiler is Not Enough

Java Decompiler # 1

I have been using Java Decompiler by http://jd.benow.ca/ since I successfully reverse-engineered an application being used by DHL Express Head Office Malaysia in Menara TM in Kuala Lumpur.

However, I faced a problem wherein JD is unable to fully reconstruct a method of a class. I needed to decompile a jar file because its source codes were nowhere to be found in the main codebase.  Looks like the original developers and previous contractors did things sloppily.


JD Unable to reconstruct the archive method

I have not figured out the rootcause but the content of the MANIFEST.INF file looks weird. I am pretty sure there should be some other stuffs there.



I could investigate further but I have a deadline to meet. So, I searched for another tool to completely reconstruct the source code file.

Java Decompiler # 2

Introducing CFR by www.benf.org Thank God I found a tool that solves my problem! You may download the jar file from www.benf.org/other/cfr/. It was able to reconstruct 99% of the codes.

Here are the steps I used it to reconstruct the file:

Step 1

Decompile A Class

Decompile A Class

Step 2

Source Code File Generated

Source Code File Generated

Finally, open the file to verify the codes have been reconstructed fully.

Class File

Class File


The archive method

There you go! The client is still in JDK6 though.

Karl San Gabriel

Karl San Gabriel

Java and Enterprise Technologies Expert