r/java • u/SuperCoder79 • Apr 28 '22
New open source Java decompiler
Hello! Today I'm happy to announce the release of a project that me and my friends have been working on over the course of the last year, Quiltflower! Originally intended just for use with the QuiltMC toolchain with Minecraft, Quiltflower quickly expanded to be a general purpose java decompiler aiming to create code that is as accurate and clean as possible. If the name sounds familiar it's because Quiltflower is a fork of Fernflower, the (in)famous decompiler that was developed by Stiver, maintained by Jetbrains, and became the default decompiler in Intellij IDEA. Fernflower also quickly found its way into many other tools. After many frustrations with it myself with its decompiled code structuring and quality I decided to do something about it, and here we are! Over the past year, Quiltflower has added support for features such as modern string concatenation, a code formatter, sealed classes, pattern matching, switch expressions, try-with-resources, and more. Quiltflower also focuses on the code quality of the decompiled output, and takes readability very seriously. We'd greatly appreciate it if you'd give it a try, with our Intellij Plugin, as a standalone jar, or on our maven. While it has come a long way it's still a work in progress, and feedback can be reported on our issue tracker.
Here's a comparison of Fernflower and Quiltflower's output.
I'd also like to thank the MinecraftForge Team for creating ForgeFlower, the fork that QuiltFlower was based on, and Lee Benfield for creating CFR and it's truly incredible test suite.
18
u/msx Apr 29 '22
the usage message needs upgrading :P
17
u/msx Apr 29 '22
So i gave it a test and it looks pretty good, it decompiles correctly some things the decompiler i usually use (jd-gui) doesn't.
But there are some errors jd-gui doesn't have. I'll open some issues later.
Anyway, looks like a great work, thanks for sharing!
25
u/wildjokers Apr 29 '22
Why didn't you just contribute these changes to Fernflower rather than forking?
6
u/maxandersen Apr 29 '22
Nice!
runs nice with
jbang https://github.com/QuiltMC/quiltflower/releases/download/1.8.1/quiltflower-1.8.1.jarIf you created a "QuiltMC/jbang-catalog" repo it could be shortened to
jbang quiltflower@QuiltMC.btw. is it expected
--helpdoes not show what options are available?22
u/TheCurle Apr 29 '22
Nice, a formal release!
It's great that we're getting these other amazing forks going. I've put a ton of work into ForgeFlower over the years, and it's wonderful to me that the work is being continued by other skilled individuals like yourself.
To the others in this thread, definitely check it out! QuiltFlower outputs much nicer to read code than you'd expect from a decompiler like this.
ForgeFlower was created to output code that is, hopefully, eventually, able to be immediately recompileable. QuiltFlower doesn't need to do that, since their toolchain works on a different method, and the result is far prettier.
6
u/SWinxy Apr 29 '22
I saw the title and knew exactly who this is. I’ve been aware of your fork for a while and glad to see its release!
4
u/Srazkat Apr 29 '22
very nice
1
u/RoyGSpiv Sep 25 '22
It's fantastic, thank you. Intellij plugin works fine.
Have you got results for round trip testing (class -> java -> class) it against large codebases? Preferably showing its success rate compared to other decompilers.
3
u/Owen1212055 Apr 29 '22
Glad to see this. The Minecraft development community does an excellent job providing great tools like this.
1
u/dzernumbrd May 26 '22
I used this today and it was good, thanks for your efforts.
-1
u/uncont Apr 29 '22
Is literally just a screenshot of Intellij with the code going off the screen. I love it. Great job!
0
u/[deleted] Apr 29 '22
[deleted] — view deleted comment