How to get java file i.e source code from class file i.e from compiled file?
-
Check this link : http://java.decompiler.free.fr/ Another one : http://www.varaneckas.com/jad – Zaje Dec 31 '09 at 08:41
6 Answers
Check out this Java Decompiler.
Also see this Wikipedia page to know more about decompilation.
It should be noted that the code you get on decompilation of bytecode isn't very readable.

- 90,905
- 62
- 285
- 365
You have to use a disassembler.
Java Decompiler is a good choice.
Also Java Decompiler has a plug-in for Eclipse.

- 5,973
- 4
- 37
- 60
You can use javap command to get the overall structure of the file.
On the side note: Best way to disable anyone from getting the source from your compiled code is to use obfuscation.

- 1,968
- 5
- 27
- 52
I just published a stand-alone Java Decompiler GUI (based on Jad) which you can get from Util Java Decompiler (JAD based) v1.0
This is a Windows based .NET 4.0 application, which supports the drag n'drop of *.jar files.

- 4,161
- 2
- 31
- 49
Yes you cannot do anything like reverse conversion.
What you can do is modify the bytecode at runtime. That's allowed in Java...
Check for java.lang.instrumentation
package. That will help you to achieve your goal to some extent...

- 12,310
- 10
- 49
- 58

- 2,688
- 9
- 30
- 46