Software Development

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.

[wp_ad_camp_5]

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.

decompile-failed

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.

decompile-failed-manifest

MANIFEST.INF

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

[wp_ad_camp_4]

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

cfr-works-004

The archive method

[wp_ad_camp_3]

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

Loading

Got comments or suggestions? We disabled the comments on this site to fight off spammers, but you can still contact us via our Facebook page!.


You Might Also Like