views:

217

answers:

3

Possible Duplicate:
Where can I find a Java decompiler?

Dear All,

I have lost my .java and only have class files left on server.i want to recover back my original code.please suggest which decompiler i can use which replicates me the exact code. Earlier i had used DJ decompiler but it changes the Java code and changes the data types of variables at its own.

+6  A: 

Which decompiler I can use which replicates me the exact code

You cannot get the "exact" source code, many source code level information is lost in the compilation process.

If you are talking about bytecode exactitude, maybe you can try to take the decompiler generated source, compile it, and then compare the bytecode to that of the class you have on the server. But you could get small differences (which aren't necessarily functionally different) because of how the compilers decided it was best to do it.

Bakkal
+4  A: 

Try Java Decompiler. But you never get the exact source, becouse javac does some optimalization.

MarrLiss
That's my favourite one too. Pretty cool and can be integrated into eclipse to replace the standard 'class file view' ;)
Andreas_D
A: 

My Favourite would be CAVAJ.

Its freeware ,lightweight ,fast and simple to use.

Sudhakar