Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find a Java decompiler? [duplicate]

Tags:

Does anyone know of a free decompiler that can decompile an entire Jar file instead of a single class? I have a problem with sub classes like name$1.class name$2.class name.class

like image 751
StoneHeart Avatar asked Mar 15 '09 02:03

StoneHeart


People also ask

Is decompiling code possible?

It is impossible use decompilation for original source code reproduction because original code identifiers, such as variable and function names, are rarely stored in computer code. However, code containing metadata or debugging information may include identifiers.

How do I decompile a Java file?

class without source default to Class Decompiler Viewer . Now, click on the class or methods, press F3 , and the plugin will automatically decompile the Java class.


1 Answers

2009: JavaDecompiler can do a good job with a jar: since 0.2.5, All files, in JAR files, are displayed.

http://java.decompiler.free.fr/sites/default/screenshots/screenshot1.png

See also the question "How do I “decompile” Java class files?".

The JD-Eclipse doesn't seem to have changed since late 2009 though (see Changes).
So its integration with latest Eclipse (3.8, 4.2+) might be problematic.

JD-Core is actively maintained.

Both are the result of the fantastic work of (SO user) Emmanuel Dupuy.


2018: A more modern option, mentioned in the comments by David Kennedy Araujo:

JetBrains/intellij-community/plugins/java-decompiler/engine

Fernflower is the first actually working analytical decompiler for Java and probably for a high-level programming language in general.

java -jar fernflower.jar [-<option>=<value>]* [<source>]+ <destination>  java -jar fernflower.jar -hes=0 -hdc=0 c:\Temp\binary\ -e=c:\Java\rt.jar c:\Temp\source\ 

See also How to decompile to java files intellij idea for a command working with recent IntelliJ IDEA.


2022 update: Florian Wendelborn suggests in the comments

this one works well: jdec.app from Leonardo Santos.

like image 124
VonC Avatar answered Oct 18 '22 19:10

VonC