fernflower | Unofficial mirror of FernFlower Java decompiler | Reverse Engineering library

 by   fesh0r Java Version: Current License: No License

kandi X-RAY | fernflower Summary

kandi X-RAY | fernflower Summary

fernflower is a Java library typically used in Utilities, Reverse Engineering applications. fernflower has no bugs, it has no vulnerabilities, it has build file available and it has medium support. You can download it from GitHub.

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.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              fernflower has a medium active ecosystem.
              It has 2915 star(s) with 590 fork(s). There are 156 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              fernflower has no issues reported. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of fernflower is current.

            kandi-Quality Quality

              fernflower has 0 bugs and 0 code smells.

            kandi-Security Security

              fernflower has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              fernflower code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              fernflower does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              fernflower releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.

            Top functions reviewed by kandi - BETA

            kandi has reviewed fernflower and discovered the below as its top functions. This is intended to give you an instant insight into fernflower implemented functionality, and help decide if they suit your requirements.
            • Convert a class to a Java class
            • Convert a lambda declaration to Java code
            • Get the mapping between a line number and an unmapped line number
            • Add a tracer for a method
            • Simplifies a switch on a switch statement
            • Searches the case values for a case
            • Evaluates a mapping of case labels to a mapping of case labels
            • Return a string representation of this block
            • Get the exception range
            • Serialize the array
            • Finds a method in the classpath
            • Returns true if the statement is a choice statement
            • Check the expression bounds of the expression
            • Returns a string representation of this exception
            • Main entry point
            • Converts an expression into a text buffer
            • Retrieves the default map of default values
            • Checks if the given list of statements contains any exceptions
            • Initializes the destination instruction
            • Transform a list of expressions into a text buffer
            • Convert a JMP statement into a text buffer
            • Attempt to guess the type of the given integer
            • Recursively visits the tree
            • Generates the bytecode for the assert statement
            • Copies an entry from source archive to the given source archive
            • Build the basic blocks from the given instruction sequence
            Get all kandi verified functions for this library.

            fernflower Key Features

            No Key Features are available at this moment for fernflower.

            fernflower Examples and Code Snippets

            No Code Snippets are available at this moment for fernflower.

            Community Discussions

            QUESTION

            Error while decompiling java class: ItemCollectionInvalidIndex: constants: requested 15873, limit 63
            Asked 2022-Feb-25 at 12:29

            I am decompiling java application, and i have already done with 99% .class files. But, I have a problem with couple of them: error while decompilation (errors are same type). Example:

            Procyon: java.lang.IllegalArgumentException: Argument 'index' must be in the range [0, 63], but value was: 15873...

            CFR:

            ...

            ANSWER

            Answered 2022-Feb-25 at 12:29

            There is nothing wrong with all decompilers i have mentioned before.

            It was a constant_pool_count issue. It happened because of some JPHP decompiler offset troubles. So, if you are trying to reverse jphp applications, use your own software to delim .phb to .class blocks with couple of bytes before each of them

            Source https://stackoverflow.com/questions/70775342

            QUESTION

            Allocating more RAM while decompiling Minecraft with MCP (Mod Coder Pack)
            Asked 2021-Dec-06 at 05:49

            I am trying to create a custom Minecraft client but first I need to decompile the source files with MCP but it fails. It fails with a JavaOutOfMemoryError. Here is the error:

            ...

            ANSWER

            Answered 2021-Dec-06 at 05:49

            Go to conf/mcp.cfg. Find this line

            Source https://stackoverflow.com/questions/70185054

            QUESTION

            Java Generics Type Erasure, compiler output different to what OCP book says
            Asked 2021-Nov-21 at 08:26

            I never did that before but yesterday I actually wanted to see what happens with Type Erasure - a lot of Books give Examples like this (this one is form OCP 11)

            ...

            ANSWER

            Answered 2021-Nov-21 at 08:26

            The point that the book is trying to make, is that the runtime doesn't care about generic type parameters. It shows that this is the case by pedagogically "lying" to you that the class file does not contain any generic type variables or arguments, which is understandable, but also not true.

            The class file does contain type variables and generic arguments used in field, method, and class declarations. You can even get them with reflection!

            Source https://stackoverflow.com/questions/70052825

            QUESTION

            Compare two ArrayList elements using method contains
            Asked 2021-Nov-01 at 21:43

            I am very new to Java

            My claas is:

            ...

            ANSWER

            Answered 2021-Nov-01 at 08:35

            ArrayList internally uses 'equals' method in 'contains' method to identify if the object is inside the ArrayList. So in this case, you need to override 'equals' with the logic you need (may be, in your case, comparing value in Menu Item). That should resolve this issue.

            Source https://stackoverflow.com/questions/69794230

            QUESTION

            buildToolsVersion and compileSdkVersion had been deprecated
            Asked 2021-Oct-17 at 13:07

            I've just noticed in a library module, that compileSdkVersion and buildToolsVersion had recently been deprecated. These are the two configurations, which it complains about (strikethrough text). This currently only affects com.android.library, not com.android.application:

            ...

            ANSWER

            Answered 2021-Sep-22 at 08:22

            It builds alike this (the library module needs to be changed):

            Source https://stackoverflow.com/questions/69279770

            QUESTION

            error: Source option 6 is no longer supported. Use 7 or later. When decompiling MCP
            Asked 2021-Apr-13 at 14:07

            Im trying to decompile the MCP v1.8.8 on mac but when I run the decompile.sh file I get this error:

            ...

            ANSWER

            Answered 2021-Apr-13 at 14:07

            Turns out the decompiled code was in the src folder

            Dragging the contents from that into the Client folder worked

            I have no idea why it didn't decompile into the Eclipse folder

            Source https://stackoverflow.com/questions/65837296

            QUESTION

            Java try-with-resource implementation done by compiler
            Asked 2021-Mar-30 at 14:18

            I was wondering, when exception occurs how try with resource statement manages to close resources before entering catch block. When exception occurs execution immediately jumps to catch block. So where actually try-with-resource closes the resources.

            To get better understanding of how it works I decided to see how compiler implements it. I wrote following code and and compiled it.

            ...

            ANSWER

            Answered 2021-Mar-30 at 13:53

            The behavior of try-with-resources is fully documented in the Java Language Specification, section 14.20.3. try-with-resources.

            It specifically shows that the following abbreviated version of the question code:

            Source https://stackoverflow.com/questions/66871966

            QUESTION

            Java byte code, calling method is not working properly
            Asked 2020-Aug-10 at 14:02

            Current situation & context

            For a school assignment, we have to write our own programming language. Currently, I am stuck trying at the point of making a method call.

            I can successfully make a method, but at the point where I am trying to call it, the program breaks.

            Test code

            The code that I am using to test is

            ...

            ANSWER

            Answered 2020-Aug-10 at 14:02

            As explained by @apangin in the comments, you are trying to call an instance method, so you need an object to call it on, but you did not supply one. You need to create a test instance and push it to the stack prior to calling testMethod, or alternatively mark testMethod as static and invoke it via invokestatic, which is probably easier in this case.

            That being said, I would also recommend using the Krakatau assembler rather than Jasmin. Krakatau uses a slightly modified form of Jasmin's syntax which is simpler and less error prone. In particular, in Krakatau, the class name, method name, and method descriptor are separated by spaces, removing a lot of the confusion you had about where you need to put the slashes when calling a method. Krakatau also has other advantages like full support for the bytecode format including Java 14 features, as well as a round trip disassembler which greatly assists with troubleshooting bytecode related issues.

            Source https://stackoverflow.com/questions/63341184

            QUESTION

            MCP940 Decompile.bat errors
            Asked 2020-May-16 at 23:29

            So I Downloaded mcp940 a few weeks ago and have been having massive problems, first when I tried using the newest version (1.12) it gave me an error:

            C:\Program Files (x86)\Java\jdk1.8.0_251\bin\java" -jar runtime\bin\fernflower.jar -din=1 -rbr=1 -dgs=1 -asc=1 -rsy=1 -iec=1 -jvn=1 -log=TRACE "-e=jars\libraries\net/java/jinput\jinput\2.0.5\jinput-2.0.5.jar" "-e=jars\libraries\com/ibm/icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar" "-e=jars\libraries\org/apache/httpcomponents\httpcore\4.3.2\httpcore-4.3.2.jar" "-e=jars\libraries\org/apache/logging/log4j\log4j-api\2.8.1\log4j-api-2.8.1.jar" "-e=jars\libraries\org/apache/commons\commons-lang3\3.5\commons-lang3-3.5.jar" "-e=jars\libraries\net/java/dev/jna\jna\4.4.0\jna-4.4.0.jar" "-e=jars\libraries\org/lwjgl/lwjgl\lwjgl-platform\2.9.4-nightly-20150209\lwjgl-platform-2.9.4-nightly-20150209-natives-windows.jar" "-e=jars\libraries\com/paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar" "-e=jars\libraries\net/sf/jopt-simple\jopt-simple\5.0.3\jopt-simple-5.0.3.jar" "-e=jars\libraries\com/mojang\text2speech\1.10.3\text2speech-1.10.3.jar" "-e=jars\libraries\com/google/guava\guava\21.0\guava-21.0.jar" "-e=jars\libraries\oshi-project\oshi-core\1.1\oshi-core-1.1.jar" "-e=jars\libraries\org/apache/httpcomponents\httpclient\4.3.3\httpclient-4.3.3.jar" "-e=jars\libraries\org/apache/commons\commons-compress\1.8.1\commons-compress-1.8.1.jar" "-e=jars\libraries\com/mojang\text2speech\1.10.3\text2speech-1.10.3-natives-windows.jar" "-e=jars\libraries\it/unimi/dsi\fastutil\7.1.0\fastutil-7.1.0.jar" "-e=jars\libraries\net/java/dev/jna\platform\3.4.0\platform-3.4.0.jar" "-e=jars\libraries\com/paulscode\codecjorbis\20101023\codecjorbis-20101023.jar" "-e=jars\libraries\com/paulscode\soundsystem\20120107\soundsystem-20120107.jar" "-e=jars\libraries\com/paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar" "-e=jars\libraries\org/lwjgl/lwjgl\lwjgl_util\2.9.4-nightly-20150209\lwjgl_util-2.9.4-nightly-20150209.jar" "-e=jars\libraries\commons-codec\commons-codec\1.10\commons-codec-1.10.jar" "-e=jars\libraries\net/java/jutils\jutils\1.0.0\jutils-1.0.0.jar" "-e=jars\libraries\com/mojang\patchy\1.1\patchy-1.1.jar" "-e=jars\libraries\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar" "-e=jars\libraries\org/lwjgl/lwjgl\lwjgl\2.9.4-nightly-20150209\lwjgl-2.9.4-nightly-20150209.jar" "-e=jars\libraries\commons-io\commons-io\2.5\commons-io-2.5.jar" "-e=jars\libraries\com/mojang\realms\1.10.17\realms-1.10.17.jar" "-e=jars\libraries\com/mojang\authlib\1.5.25\authlib-1.5.25.jar" "-e=jars\libraries\com/google/code/gson\gson\2.8.0\gson-2.8.0.jar" "-e=jars\libraries\net/java/jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-windows.jar" "-e=jars\libraries\com/paulscode\codecwav\20101023\codecwav-20101023.jar" "-e=jars\libraries\org/apache/logging/log4j\log4j-core\2.8.1\log4j-core-2.8.1.jar" "-e=jars\libraries\io/netty\netty-all\4.1.9.Final\netty-all-4.1.9.Final.jar" temp/minecraft_ff_in.jar temp\src\minecraft' failed : 1 Decompile failed

            I've been searching around and have had no luck, first I found someone saying I should add -Xmx2G to the beginning of a string in mcp.cfg Here it is before and after

            CmdFernflower = %s -jar %s -din=1 -rbr=1 -dgs=1 -asc=1 -rsy=1 -iec=1 -jvn=1 -log=TRACE {extra} {indir} {outdir}

            CmdFernflower = %s -Xmx2G -jar %s -din=1 -rbr=1 -dgs=1 -asc=1 -rsy=1 -iec=1 -jvn=1 -log=TRACE {extra} {indir} {outdir}

            after I added that it gave me another error:

            '"C:\Program Files (x86)\Java\jdk1.8.0_251\bin\java" -Xmx2G -jar runtime\bin\fernflower.jar -din=1 -rbr=1 -dgs=1 -asc=1 -rsy=1 -iec=1 -jvn=1 -log=TRACE "-e=jars\libraries\net/java/jinput\jinput\2.0.5\jinput-2.0.5.jar" "-e=jars\libraries\com/ibm/icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar" "-e=jars\libraries\org/apache/httpcomponents\httpcore\4.3.2\httpcore-4.3.2.jar" "-e=jars\libraries\org/apache/logging/log4j\log4j-api\2.8.1\log4j-api-2.8.1.jar" "-e=jars\libraries\org/apache/commons\commons-lang3\3.5\commons-lang3-3.5.jar" "-e=jars\libraries\net/java/dev/jna\jna\4.4.0\jna-4.4.0.jar" "-e=jars\libraries\org/lwjgl/lwjgl\lwjgl-platform\2.9.4-nightly-20150209\lwjgl-platform-2.9.4-nightly-20150209-natives-windows.jar" "-e=jars\libraries\com/paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar" "-e=jars\libraries\net/sf/jopt-simple\jopt-simple\5.0.3\jopt-simple-5.0.3.jar" "-e=jars\libraries\com/mojang\text2speech\1.10.3\text2speech-1.10.3.jar" "-e=jars\libraries\com/google/guava\guava\21.0\guava-21.0.jar" "-e=jars\libraries\oshi-project\oshi-core\1.1\oshi-core-1.1.jar" "-e=jars\libraries\org/apache/httpcomponents\httpclient\4.3.3\httpclient-4.3.3.jar" "-e=jars\libraries\org/apache/commons\commons-compress\1.8.1\commons-compress-1.8.1.jar" "-e=jars\libraries\com/mojang\text2speech\1.10.3\text2speech-1.10.3-natives-windows.jar" "-e=jars\libraries\it/unimi/dsi\fastutil\7.1.0\fastutil-7.1.0.jar" "-e=jars\libraries\net/java/dev/jna\platform\3.4.0\platform-3.4.0.jar" "-e=jars\libraries\com/paulscode\codecjorbis\20101023\codecjorbis-20101023.jar" "-e=jars\libraries\com/paulscode\soundsystem\20120107\soundsystem-20120107.jar" "-e=jars\libraries\com/paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar" "-e=jars\libraries\org/lwjgl/lwjgl\lwjgl_util\2.9.4-nightly-20150209\lwjgl_util-2.9.4-nightly-20150209.jar" "-e=jars\libraries\commons-codec\commons-codec\1.10\commons-codec-1.10.jar" "-e=jars\libraries\net/java/jutils\jutils\1.0.0\jutils-1.0.0.jar" "-e=jars\libraries\com/mojang\patchy\1.1\patchy-1.1.jar" "-e=jars\libraries\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar" "-e=jars\libraries\org/lwjgl/lwjgl\lwjgl\2.9.4-nightly-20150209\lwjgl-2.9.4-nightly-20150209.jar" "-e=jars\libraries\commons-io\commons-io\2.5\commons-io-2.5.jar" "-e=jars\libraries\com/mojang\realms\1.10.17\realms-1.10.17.jar" "-e=jars\libraries\com/mojang\authlib\1.5.25\authlib-1.5.25.jar" "-e=jars\libraries\com/google/code/gson\gson\2.8.0\gson-2.8.0.jar" "-e=jars\libraries\net/java/jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-windows.jar" "-e=jars\libraries\com/paulscode\codecwav\20101023\codecwav-20101023.jar" "-e=jars\libraries\org/apache/logging/log4j\log4j-core\2.8.1\log4j-core-2.8.1.jar" "-e=jars\libraries\io/netty\netty-all\4.1.9.Final\netty-all-4.1.9.Final.jar" temp/minecraft_ff_in.jar temp\src\minecraft' failed : 1 Decompile failed

            It's very similar to the old error and not the same as the first error I got when adding -Xmx2G

            Strangely enough, I don't get this error in 1.7.10 (mcp908) and can edit the game fine, I was also able to go in the Wayback machine and use 1.8 (mcp910?) can somebody please help?

            Thanks, Arik

            ...

            ANSWER

            Answered 2020-May-16 at 23:29

            The problem is apparent from the end of mcp.log:

            Source https://stackoverflow.com/questions/61826353

            QUESTION

            how to keep private members in pro-guard rules
            Asked 2020-May-06 at 20:21

            I am trying to use Proguard to keep my private fields, but it won't work. I stole most of this from Proguard keep classmembers because that question is similar to what I'm asking, and also followed this link How to tell ProGuard to keep private fields without specifying each field

            But it still doesn't work.

            I want to make a library for another company and still keep my access level modifiers fields and methods.

            Proguard:

            ...

            ANSWER

            Answered 2020-May-06 at 20:21

            It seems like R8 is causing this issue and not Proguard.

            Go into gradle.properties, and set android.enableR8=false. Next time you build, it will use Proguard.

            R8 is Google's answer to Proguard and in the recent versions of The Android Gradle Plugin (3.4.0+) it defaults to R8's code shrinker/obfuscator. There are some pros and cons to using Google's version instead of Guardsquare's technology.

            For more information, look at the documentation

            Source https://stackoverflow.com/questions/61632213

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install fernflower

            You can download it from GitHub.
            You can use fernflower like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the fernflower component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/fesh0r/fernflower.git

          • CLI

            gh repo clone fesh0r/fernflower

          • sshUrl

            git@github.com:fesh0r/fernflower.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Reverse Engineering Libraries

            ghidra

            by NationalSecurityAgency

            radare2

            by radareorg

            ILSpy

            by icsharpcode

            bytecode-viewer

            by Konloch

            ImHex

            by WerWolv

            Try Top Libraries by fesh0r

            newkind

            by fesh0rC

            xnb_parse

            by fesh0rPython

            romdump

            by fesh0rPython

            b-em

            by fesh0rC

            fez-unpack

            by fesh0rPython