File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to decompile .class file? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "How to decompile .class file?" Watch "How to decompile .class file?" New topic
Author

How to decompile .class file?

phani kon
Ranch Hand

Joined: Apr 06, 2005
Posts: 251
Can anyone tell me, is there any way I can convert .class files to .java.?

Accidently source code of java got deleted in CVS

Please suggest me in this ASAP


[Please UseAMeaningfulSubjectLine - Dave]
[ February 26, 2008: Message edited by: David O'Meara ]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32704
    
    4
Please use a more specific title for your posts.
Please search for "decompiler." There are several products which will try what you want, and they are discussed on the Ranch from time to time. I know there is one called JAD, but I have never used any of them
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35250
    
    7
That is what decompilers do. I've had good results with JODE (on SourceForge).


Android appsImageJ pluginsJava web charts
phani kon
Ranch Hand

Joined: Apr 06, 2005
Posts: 251
how decomplier works?

could you please explain me with examples.
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Can't you undelete the file? This should work:

cvs add filename


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Mike Anna
Ranch Hand

Joined: Jul 08, 2007
Posts: 112
There isnnt a way a developer(I am assuming you are one) can actually delete the file from SVN. I have maintained repos myself, and I bet my behind, I would give no developers such rights.
If I were you, I would get a copy of the file from the logs of the repo. Test it and check if there is any functionality missing and then add that functionality and check it back in. If you are bent on decompiling: IIRC there is no decomp. which can give you 100% code back. Still, just download any opensource decomp and read through the manual if you want to know how to use it.

cheers...


Can't you undelete the file? This should work:

--------------------------------------------------------------------------------
cvs add filename
--------------------------------------------------------------------------------

--------------------

lzr zhao
Greenhorn

Joined: Feb 24, 2008
Posts: 8
try to use jad
click here to download
phani kon
Ranch Hand

Joined: Apr 06, 2005
Posts: 251
I have a problem with this logic I am getting NumberFormat exception
while doing TotAmt. Also suppose if i need to handle the empty array how would i handle it.

Could please any one help me in the below case

String [][] list = new String[3][3];
list[0][0] = "7.00"; for empty string list[0][0]="";
list[0][1]= "56.00";
list[0][2]= "eeeee";
list[1][0]="8.00";
list[1][1]="66.00";
list[2][2]="nnnnn";
float f = 0.0f;
for(int i=0; i<list.length; i++)
{
for(int j=0; j<list[i].length; j++)
{

if(i<2 && j<2)
System.out.println(list[i][j]);
f += Float.parseFloat(list[j][j]);
System.out.println("fl:" +f);
}
}


}

thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35250
    
    7
lakshmi,

this thread is about decompilers. Please don't use it for follow-up questions that have nothing to do with that. Start a new topic instead.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to decompile .class file?
 
Similar Threads
Hi
Servlets
Deploying to Glassfish
HI
abstract class