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
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
I have had reasonable success with a tool named (frustratingly) "JD: Java Decompiler".
I have found it better than most decompilers when dealing with classes compiled for Java 5 and higher. Unfortunately, it can still have some hiccups where JAD would normally succeed.
You extract it and then use jad against the dir.
A jar file is just a zip file with jar extension. You should be able to unzip(winzip) a jar just like a zip file.
2009: JavaDecompiler can do a good job with a jar: since 0.2.5, All files, in JAR files, are displayed.
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
First of all, it's worth remembering that all Java archive files (
.jar
/.war
/etc...) are all basically just fancy.zip
files, with a few added manifests and metadata.Second, to tackle this problem I personally use several tools which handle this problem on all levels:
.class
filesjar
s. Well worth a try.The advantage of all the aforementioned, is that I do not need to hold any other external tool which clutters my work environment. Everything I will ever need from one of those files can be handled inside my IDE or diffed with other files natively.
Insert the following into decompile.jar.sh
Ready to use, just type
dj your.jar
and you will getyour.jar.src
folder with sources. Use-d
option for debug mode.