This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes How can I convert .class files to .java files(source code)? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How can I convert .class files to .java files(source code)? " Watch "How can I convert .class files to .java files(source code)? " New topic
Author

How can I convert .class files to .java files(source code)?

Sang-Wook Kim
Ranch Hand

Joined: Jan 07, 2004
Posts: 36
Hello,
I found a nice applet on the web and I would like to
slightly modify its methods but the problem is that I
don't have the source code but only the .class file.
I heard somewhere that there is a tool that converts
.class files to .java files. Does anybody know about
this?
Sang-Wook
David Peterson
author
Ranch Hand

Joined: Oct 14, 2001
Posts: 154
Take a look at some of the tools indexed in Google under
"Decompilers and Disassemblers".
I have used Jad in the past, with good results, but the website seems to be down at the moment (due to excess bandwidth). With some hunting around using Google, you may be able to track down a mirror of the site.
Hope this helps.
David Peterson
Jeff Langr
author
Ranch Hand

Joined: May 14, 2003
Posts: 762
The Jad site has seemed to be down for years now...
-j-


Books: Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
Ray Stojonic
Ranch Hand

Joined: Aug 08, 2003
Posts: 326
DJ Java Decompiler is nice, available via download.com
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Originally posted by Jeff Langr:
The Jad site has seemed to be down for years now...

Are you thinking of Mocha? The link Mr. Peterson gives above works fine.


[Jess in Action][AskingGoodQuestions]
Sadanand Murthy
Ranch Hand

Joined: Nov 26, 2003
Posts: 382
Just keep in mind that there could be legal issues/ramifications with decompiling some one else's app and distributing it as your own after some modifications.


Ever Existing, Ever Conscious, Ever-new Bliss
Jeff Langr
author
Ranch Hand

Joined: May 14, 2003
Posts: 762
Originally posted by Ernest Friedman-Hill:
Are you thinking of Mocha? The link Mr. Peterson gives above works fine.

No, Jad. This link: http://kpdus.tripod.com/jad.html -- has not worked for aeons.
-J-
Sang-Wook Kim
Ranch Hand

Joined: Jan 07, 2004
Posts: 36
Thanks a lot to all of you who answered! It helped a lot!
Cheers
Sang-Wook
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Originally posted by Jeff Langr:

No, Jad. This link: http://kpdus.tripod.com/jad.html -- has not worked for aeons.
-J-

If I click on it, It goes immediately to the Jad site.
 
jQuery in Action, 2nd edition
 
subject: How can I convert .class files to .java files(source code)?
 
Similar Threads
Class definitions 2 source
Does Javadoc.exe use Reflection
how to create java Doc
FTP
Is it possible to perform reverse process in recompiling .class files?