Get your CodeRanch badge!*
The moose likes Beginning Java and the fly likes Extracting .class to .java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Extracting .class to .java?" Watch "Extracting .class to .java?" New topic
Author

Extracting .class to .java?

Salim Sentosa
Greenhorn

Joined: Oct 29, 2001
Posts: 6
I accidently deleted a .java class, but I have the latest .class file.
Is it possible to re-convert it back?
If so how? if not... o'well, start over.
Thanks in advance!
Jorge Phillips
Ranch Hand

Joined: Jun 03, 2001
Posts: 43
Try a Java decompiler such as Mocha or Crema. Decompile your class into source code and comment it again.
You can get a free version of an old beta of Mocha from http://www.brouhaha.com/~eric/computers/mocha.html. This is probably enough for retrieving your deleted .java file. Of course you could also buy a commercial decompiler of which there are quite a few.
Good luck.
Salim Sentosa
Greenhorn

Joined: Oct 29, 2001
Posts: 6
Hi,
I did a search on downloads.com, and found a great one!
Free too. Try here:
http://download.cnet.com/downloads/0-14493-100-7621614.html?tag=st.dl.10000-103-1.lst-7-1.7621614
Thanks for the hint allowing me to search!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Extracting .class to .java?
 
Similar Threads
Read classes using java reflection
JSP tags (JSTL) and request Attributes
About Adapter Class
Shell Script Call from java
Core Java Basic