Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Java 

Need help decompiling jar file

Need help decompiling a jar file and recompiling so that I can create a source. I have all related dependencies, but can't seem to get a good compile using Procyon or anything else similar.
You'll never be able to get the 'original' source when decompiling a jar file. A classic Jar file is just an archive anyway, you can extract the class files inside of it and you'd actually need to decompile the class files to get the source code.

This tool, unlike Procyon is actually still being updated, you might have better luck:
https://github.com/java-decompiler
https://github.com/java-decompiler/jd-eclipse
https://github.com/java-decompiler/jd-gui

The bytecode is what's important anyway. If it's important to you, you'll have to get into it sooner or later. In addition, if the class files are heavily obfuscated, it'll be rather tricky to get the original source. There are tools available to deobfuscate for you, such as:
https://github.com/java-deobfuscator/deobfuscator
https://github.com/java-deobfuscator/deobfuscator-gui

Your friend GenericSkid has a very extensive list of things you can try, right here:
https://github.com/GenericException/Skid...scation.md
[Image: vp6iypF.gif]
(Oct 1, 2020 05:49 PM)MavenGradle Wrote:  You'll never be able to get the 'original' source when decompiling a jar file. A classic Jar file is just an archive anyway, you can extract the class files inside of it and you'd actually need to decompile the class files to get the source code.

This tool, unlike Procyon is actually still being updated, you might have better luck:
https://github.com/java-decompiler
https://github.com/java-decompiler/jd-eclipse
https://github.com/java-decompiler/jd-gui

The bytecode is what's important anyway. If it's important to you, you'll have to get into it sooner or later. In addition, if the class files are heavily obfuscated, it'll be rather tricky to get the original source. There are tools available to deobfuscate for you, such as:
https://github.com/java-deobfuscator/deobfuscator
https://github.com/java-deobfuscator/deobfuscator-gui

Your friend GenericSkid has a very extensive list of things you can try, right here:
https://github.com/GenericException/Skid...scation.md

Right I understand that I won't get the source code. I currently have something and I need to edit a few lines of code for it to work but I can't get into contact with the developer for it.

Haven't had a ton of luck with JD-GUI, Fernflower, Procyon, or CFR (Latter 3 in recaf)
Depending on the scale of what you want you can use recaf to recompile inside of recaf or edit the class bytecode.

However if your classes are obfuscated then like mvn said you'll likely want to clean it up a bit first.
(Oct 2, 2020 04:47 PM)GenericSkid Wrote:  Depending on the scale of what you want you can use recaf to recompile inside of recaf or edit the class bytecode.

However if your classes are obfuscated then like mvn said you'll likely want to clean it up a bit first.

It is not heavily obfuscated. I have Recaf, but need to edit the source a little bit to make it compatible with another API.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Java] by lasermatApr 19, 2022 12:14 PM 2 250 Apr 19, 2022 12:14 PM
Last Post: _0xC_
[Java] by royaltyyyNov 25, 2020 11:53 PM 7 267 Nov 25, 2020 11:53 PM
Last Post: royaltyyy
[Python] by Doge567Aug 14, 2019 04:10 PM 1 158 Aug 14, 2019 04:10 PM
Last Post: eparallax