File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes How to get .java file from .class file? 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 » Beginning Java
Bookmark "How to get .java file from .class file?" Watch "How to get .java file from .class file?" New topic
Author

How to get .java file from .class file?

Pawan Rao
Ranch Hand

Joined: Dec 29, 2005
Posts: 30
To get .class file from .java, we have javac.
But, how do we get .java file if we have only the .class file?


Stop not till the goal is reached...
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

http://members.fortunecity.com/neshkov/dj.html


[My Blog]
All roads lead to JavaRanch
Tauri Valor
Ranch Hand

Joined: Aug 03, 2005
Posts: 166
You can use Java Decompiler tools for this. One such tool is jad.
Search Google for jad.


A Moment's insight is sometimes worth a Life's experience.
Pawan Rao
Ranch Hand

Joined: Dec 29, 2005
Posts: 30
Thanks a lot.
Gadi Reddy
Greenhorn

Joined: Jan 10, 2006
Posts: 21
Hi,
By using Java Decompiler we will get .java file .
but the thing is we are not getting exact java file( but we will get whatever we write the java file apart from that we will get some system generated code also , but no problem.
Regards,
Raghu
Ashan Ranasinghe
Greenhorn

Joined: Oct 06, 2004
Posts: 8
you could also use jcavaj

thats a cool tool.

also the jdk comes with its own tool but thats not so good

Ashan
 
jQuery in Action, 2nd edition
 
subject: How to get .java file from .class file?
 
Similar Threads
How to get Java file from .class file ?
from class file to java file
Identifying Class Name - As in Editors
Class files related
why are JAR files created