Quiltflower is a fork of Fernflower adding additional features for use with the Quilt toolchain.

Related tags



Quiltflower is a fork of Fernflower adding additional features for use with the Quilt toolchain.

Changes include:

  • Javadoc application
  • Multithreading
  • Handful of other fixes

When pulling from upstream, use https://github.com/fesh0r/fernflower

About Fernflower

Fernflower is the first actually working analytical decompiler for Java and probably for a high-level programming language in general. Naturally it is still under development, please send your bug reports and improvement suggestions to the issue tracker.


Fernflower is licenced under the Apache Licence Version 2.0.

Running from command line

java -jar fernflower.jar [-

* means 0 or more times
+ means 1 or more times

: file or directory with files to be decompiled. Directories are recursively scanned. Allowed file extensions are class, zip and jar. Sources prefixed with -e= mean "library" files that won't be decompiled, but taken into account when analysing relationships between classes or methods. Especially renaming of identifiers (s. option 'ren') can benefit from information about external classes.

: destination directory


java -jar fernflower.jar -hes=0 -hdc=0 c:\Temp\binary\ -e=c:\Java\rt.jar c:\Temp\source\

java -jar fernflower.jar -dgs=1 c:\Temp\binary\library.jar c:\Temp\binary\Boot.class c:\Temp\source\

Command-line options

With the exception of mpm and urc the value of 1 means the option is activated, 0 - deactivated. Default value, if any, is given between parentheses.

Typically, the following options will be changed by user, if any: hes, hdc, dgs, mpm, ren, urc The rest of options can be left as they are: they are aimed at professional reverse engineers.

  • rbr (1): hide bridge methods
  • rsy (0): hide synthetic class members
  • din (1): decompile inner classes
  • dc4 (1): collapse 1.4 class references
  • das (1): decompile assertions
  • hes (1): hide empty super invocation
  • hdc (1): hide empty default constructor
  • dgs (0): decompile generic signatures
  • ner (1): assume return not throwing exceptions
  • den (1): decompile enumerations
  • rgn (1): remove getClass() invocation, when it is part of a qualified new statement
  • lit (0): output numeric literals "as-is"
  • asc (0): encode non-ASCII characters in string and character literals as Unicode escapes
  • bto (1): interpret int 1 as boolean true (workaround to a compiler bug)
  • nns (0): allow for not set synthetic attribute (workaround to a compiler bug)
  • uto (1): consider nameless types as java.lang.Object (workaround to a compiler architecture flaw)
  • udv (1): reconstruct variable names from debug information, if present
  • rer (1): remove empty exception ranges
  • fdi (1): de-inline finally structures
  • mpm (0): maximum allowed processing time per decompiled method, in seconds. 0 means no upper limit
  • ren (0): rename ambiguous (resp. obfuscated) classes and class elements
  • urc (-): full name of a user-supplied class implementing IIdentifierRenamer interface. It is used to determine which class identifiers should be renamed and provides new identifier names (see "Renaming identifiers")
  • inn (1): check for IntelliJ IDEA-specific @NotNull annotation and remove inserted code if found
  • lac (0): decompile lambda expressions to anonymous classes
  • nls (0): define new line character to be used for output. 0 - '\r\n' (Windows), 1 - '\n' (Unix), default is OS-dependent
  • ind: indentation string (default is 3 spaces)
  • log (INFO): a logging level, possible values are TRACE, INFO, WARN, ERROR

Renaming identifiers

Some obfuscators give classes and their member elements short, meaningless and above all ambiguous names. Recompiling of such code leads to a great number of conflicts. Therefore it is advisable to let the decompiler rename elements in its turn, ensuring uniqueness of each identifier.

Option 'ren' (i.e. -ren=1) activates renaming functionality. Default renaming strategy goes as follows:

  • rename an element if its name is a reserved word or is shorter than 3 characters
  • new names are built according to a simple pattern: (class|method|field)_
    You can overwrite this rules by providing your own implementation of the 4 key methods invoked by the decompiler while renaming. Simply pass a class that implements org.jetbrains.java.decompiler.main.extern.IIdentifierRenamer in the option 'urc' (e.g. -urc=com.example.MyRenamer) to Fernflower. The class must be available on the application classpath.

The meaning of each method should be clear from naming: toBeRenamed determine whether the element will be renamed, while the other three provide new names for classes, methods and fields respectively.

  • Uninline double and float values

    Uninline double and float values

    This PR uninlines commonly used values, such as mutations of pi and e. This greatly improves code readability in the decompiled output.

    opened by SuperCoder7979 2
  • Don't add

    Don't add "D" literal when decompiling doubles

    This PR improves readability of the decompiled output created by Fernflower by not appending the "D" literal to decompiled doubles. Related tests have also been modified to reflect this new behavior.

    opened by SuperCoder7979 0
  • Fix  float precision issues

    Fix float precision issues

    This PR fixes issues with floats casted as doubles represented as 0.20000000298023224 instead of 0.2F, for example.

    opened by SuperCoder7979 0
  • Improve output of bitwise operations

    Improve output of bitwise operations

    This PR improves two pain points with FernFlower's bitwise operation code, specifically:

    • & 65535 and & 0xFFFF being decompiled as & '\uffff'
    • Hex values used in color bit masking such as 0xFF0000, 0xFF00, and 0xFF not being decompiled properly

    These issues have been addressed with this PR.

    opened by SuperCoder7979 0
  • Fix boolean values assigned to int variables

    Fix boolean values assigned to int variables

    This PR fixes a longstanding issue where fernflower would assign boolean values to integer values. It also fixes it in the worst way possible. Sometimes, fernflower would produce a result of int i = true; for any nonzero values of i, causing much confusion for new modders. Fixing this will improve the experience of new modders looking at minecraft's code.

    opened by SuperCoder7979 0
  • Remove parentheses from single-param lambdas

    Remove parentheses from single-param lambdas

    Removes the parentheses from lambdas with only 1 parameter, making them cleaner. Thank you so much for this @williambl!

    opened by SuperCoder7979 0
  • Apply ForgeFlower's patches

    Apply ForgeFlower's patches

    This PR applies ForgeFlower's patches to our current working tree, to reduce the amount of work needed on our part. Many of their patches have been tried and tested in creating good results for decompiled code, which provides a strong base to work off of. Much more testing and cleanup work needs to be done before it can be merged so the PR is in a draft state at the moment.

    opened by SuperCoder7979 1
  • Uninlining: add tests and support for more fractional pi multiples

    Uninlining: add tests and support for more fractional pi multiples

    This PR replaces the hardcoded UNIT_CIRCLE array of valid-for-uninlining fractional multiples of pi with a loop which will find and uninline all multiples with numerator and denominator less than or equal to 12.

    It also adds tests for the uninlining of max, min, nan, e, pi, multiples of pi, etc.

    opened by williambl 2
Simple API, Complex Emails (JavaMail smtp wrapper)

Simple Java Mail Simple Java Mail is the simplest to use lightweight mailing library for Java, while being able to send complex emails including CLI s

Benny Bottema 819 Mar 12, 2021
Ultra-fast SQL-like queries on Java collections

CQEngine - Collection Query Engine CQEngine – Collection Query Engine – is a high-performance Java collection which can be searched with SQL-like quer

Niall Gallagher 1.3k Mar 12, 2021
Tools for working with generic types

TypeTools A simple, zero-dependency library for working with types. Supports Java 1.6+ and Android. Introduction One of the sore points with Java invo

Jonathan Halterman 501 Mar 11, 2021
Modern Java - A Guide to Java 8

Modern Java - A Guide to Java 8 This article was originally posted on my blog. You should also read my Java 11 Tutorial (including new language and AP

Benjamin Winterberg 14.5k Mar 13, 2021
bilibili-coin-show hand ,自动参与哔哩哔哩游戏赛事预测,赚取硬币,B站游戏竞猜,赚硬币。

个利用 Linux Crontab , GitHub Action 等方式实现哔哩哔哩(Bilibili)赛事预测的工具,用于每日赚取硬币

Junzhou Liu 46 Apr 7, 2021
Feature Flags for Java made easy

✨ ✨ ✨ FF4J - Feature Flipping for Java ✨ ✨ ✨ FF4j, is an implementation of the Feature Toggle pattern. ?? Features Feature Toggle: Enable. and disable

FF4j 898 Mar 12, 2021
Sketchware Pro's sources, in Java.

Sketchware Pro This is for everyone who wants to contribute to Sketchware Pro's development. There are few things that must be taken into consideratio

Javkhlan K. 16 Apr 19, 2021
A lightweight command processing pipeline ❍ ⇢ ❍ ⇢ ❍ for your Java awesome app.

PipelinR PipelinR is a lightweight command processing pipeline ❍ ⇢ ❍ ⇢ ❍ for your awesome Java app. PipelinR has been battle-proven on production, as

Eduards Sizovs 132 Mar 13, 2021
A lightweight, simple FTP server. Pure Java, no dependencies.

MinimalFTP A lightweight, simple FTP server. Pure Java, no libraries. Features Although it's named "minimal", it supports a bunch of features: 100% Ja

Guilherme Chaguri 95 Mar 10, 2021
ThirdEye is an integrated tool for realtime monitoring of time series and interactive root-cause analysis.

ThirdEye is an integrated tool for realtime monitoring of time series and interactive root-cause analysis. It enables anyone inside an organization to collaborate on effective identification and analysis of deviations in business and system metrics. ThirdEye supports the entire workflow from anomaly detection, over root-cause analysis, to issue resolution and post-mortem reporting.

null 10 Mar 17, 2021
Support alternative markup for Apache Maven POM files

Overview Polyglot for Maven is a set of extensions for Maven 3.3.1+ that allows the POM model to be written in dialects other than XML. Several of the

null 748 Mar 10, 2021
The WhatsApp lib for java

Gorgeous The WhatsApp lib Yowsup is no longer updated. There is no WhatsApp library available, but many people need it. I will gradually open source t

null 20 Mar 27, 2021
Make Slack and Facebook Bots in Java.

JBot Make bots in Java. JBot is a java framework (inspired by Howdyai's Botkit) to make Slack and Facebook bots in minutes. It provides all the boiler

Ram 1.1k Mar 11, 2021
A Java to iOS Objective-C translation tool and runtime.

J2ObjC: Java to Objective-C Translator and Runtime Project site: https://j2objc.org J2ObjC blog: https://j2objc.blogspot.com Questions and discussion:

Google 5.8k Mar 13, 2021