How to View a .class files? Use JAD


We all are aware that, when a java code is compiled, we get a .class file. This is called compilation. However is there a reverse process for this?? Yes. Its decompilation. Below is how we can convert .class file to a java file. 

There is a simpler way of doing this. Using a GUI tool named “JD-GUI 0.2.8“. You can get it from here.

 So, how to go about? Here is how,

  1. Download a decompiler called JAD from here.
  2. Choose ”Jad 1.5.8g for Windows 9x/NT/2000 on Intel platform “  if you’re using windows.(Skip this step if you have used the second link to download the JAD)
  3. You’ll get a jad.exe file from the download. Paste it inside the folder where your .class file is.
  4. Double clikc the jad.exe file once. Doing so jad cmd will appear and disappear.
  5. Open your command promt and change its directory path to wher your .class file exits. For eg., if your .class file is in c:/freddie/java, fire a command in command promt like cd c:/freddie/java.
  6. Lets assume you want to view helloworld.class, then fire a command like jad helloworld.class.
  7. A JAD file would be generated now.
  8. Fire another command like jad -sjava helloworld.class.
  9. Your file would have been created now.

That’s it my friends. These are the simple 9 steps to convert a .class file to a .java file (otherwise called as decompilation).


If you wish to decompile many .class files at a go, use the below command,

jad *.class

jad -sjava *.class

Note: There is a simpler way of doing this. Using a GUI tool named “JD-GUI 0.2.8“. You can get it from here.

I hope this is a valuable information for the needy :)

14 Responses

  1. this is not a suffcient answers that why we use JAD modell. please send me at the above mail adress. shankha

  2. Hi ,

    Thanks for posting the gr8 content . It really helps me .

    It helps me to recover my content which were got deleted .

    Keep the good work gng on for community ….

    • Thank you very much Amit

  3. This really helped me a lot… Thanks!

  4. thnx lot

  5. Thank you very much, it’s a very valuable information for me. Keep posting……
    Thank you

  6. this is so good… thanks fro helping us know this ….

  7. thanks a lot…very good information…

  8. Thanks! Great info!

    • thanks a lot……………superb way………….

  9. Thumbs up!!!
    Please post more tutorial like this, it really helpS a lot.

  10. Sir it really work….thx

  11. thanks sir

  12. Awesome job thanks a lot!!!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: