As of August 2017 and IntelliJ V2017.2, the accepted answer does not seem to be entirely accurate anymore: there is no fernflower.jar to use.

The jar file is called java-decompiler.jar and does not include a main manifest... Instead you can use the following command (from a Mac install):

java -cp "/Applications/IntelliJ IDEA.app/Contents/plugins/java-decompiler/lib/java-decompiler.jar" org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler

(you will get the wrong Usage command, but it does work).

Answer from yan on Stack Overflow
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 6061217524626-How-to-decompile-and-debug-a-jar-file
How to decompile and debug a .jar file? – IDEs Support (IntelliJ Platform) | JetBrains
June 13, 2022 - In the end, I want to be able to run a .jar file and set break points. ... Open an existing project or create a new one. Go to Project structure settings > Libraries. Add the jar you want to decompile in libraries by clicking the + symbol.
Top answer
1 of 12
98

As of August 2017 and IntelliJ V2017.2, the accepted answer does not seem to be entirely accurate anymore: there is no fernflower.jar to use.

The jar file is called java-decompiler.jar and does not include a main manifest... Instead you can use the following command (from a Mac install):

java -cp "/Applications/IntelliJ IDEA.app/Contents/plugins/java-decompiler/lib/java-decompiler.jar" org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler

(you will get the wrong Usage command, but it does work).

2 of 12
57

Follow instructions for IntelliJ JD plugin. Or see an excerpt from the instructions below.

java -jar fernflower.jar [<source>]+ <destination>

+ means 1 or more times
<source>: file or directory with files to be decompiled. Directories are recursively scanned. Allowed file extensions are class, zip and jar.
<destination>: destination directory

Example:

java -jar fernflower.jar -hdc=0 -dgs=1 -rsy=1 -lit=1 c:\Temp\binary\ -e=c:\Java\rt.jar c:\Temp\source\

Be aware that if you pass it a ".jar" file for the source, it will create another ".jar" file in the destination, however, within the new ".jar" file, the files will be .java instead of .class files (it doesn't explode the jar).


UPDATE

People ask me: How do I get the fernflower.jar?

If you have any IntelliJ product installed, chances are that you already have the Fernflower decompiler on your computer. IntelliJ IDEA comes with Java Bytecode Decompiler plugin (bundled) which is a modern extension of Fernflower.

  1. Locate the file in ${IntelliJ_INSTALL_DIR}\plugins\java-decompiler\lib\java-decompiler.jar (example: C:\Program Files\JetBrains\IntelliJ IDEA 2018\plugins\java-decompiler\lib).
  2. Copy it somewhere and rename to fernflower.jar (optional).
  3. This JAR is not executable, so we can't run it using java -jar. However something like this works:

    java -cp fernflower.jar org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler [<source>]+ <destination>
    

    org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler is the class that contains the main method to run the decompiler.

    Example:

    mkdir output_src
    java -cp fernflower.jar org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler -hdc=0 -dgs=1 -rsy=1 -lit=1 ./input.jar ./output_src
    

If you don't have IntelliJ products installed, either download it now (available on jetbrains.com) or make your own decompiler executable from sources (available on Github).

Discussions

Fernflower and IntelliJ IDEA's java-decompiler - Stack Overflow
no main manifest attribute, in /home//idea-IC-162.1628.40/plugins/java-decompiler/lib/java-decompiler.jar · Has IntelliJ stopped supporting command-line based decompilation, or am I missing something here? More on stackoverflow.com
🌐 stackoverflow.com
Visually Edit Decompiled Class File?
You know Mojang published deobfuscation mappings for versions above 1.14 ? More on reddit.com
🌐 r/IntelliJIDEA
6
6
March 3, 2022
New open source Java decompiler
Why didn't you just contribute these changes to Fernflower rather than forking? More on reddit.com
🌐 r/java
40
219
April 29, 2022
Looking for a Java decompiler
I've had a good experience with this one: http://jd.benow.ca/ EDIT: You decompile the .class file, which is a compiled .java file. A .jar file may contain .java files as well. More on reddit.com
🌐 r/java
49
28
June 13, 2017
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 19486779995410-Help-me-decompile-my-jar-file
Help me decompile my .jar file? – IDEs Support (IntelliJ Platform) | JetBrains
June 11, 2024 - Is it telling me that even the .jar file is destroyed? Is it a total loss? Is all my hard work destroyed forever? Do I need to start from the very beginning all over again? ... Well that helps, got my code back, but now all of my files are “Read Only” and can NOT be edited, how do I exit read only mode? ... The .class files are not editable. You can try to copy the decompiled contents into .java files and see if that helps.
🌐
JetBrains
plugins.jetbrains.com › plugin › 7100-java-decompiler
Java Decompiler - IntelliJ IDEs Plugin | Marketplace
JD-IntelliJ is a Java decompiler for the IntelliJ IDEA. Open a Java class file to see the decompiled code. It is based on the famous JD-GUI's core library JD-Core...
🌐
JetBrains
jetbrains.com › help › idea › decompiler.html
Java bytecode decompiler | IntelliJ IDEA Documentation
February 18, 2025 - Make sure that the Java Bytecode ... IntelliJ IDEA features the Java bytecode decompiler that shows you compiled bytecode as if it were human-readable Java code....
🌐
Medium
medium.com › @cvr4314 › cracking-open-jar-files-a-developers-guide-to-decompiling-f9c07f2064c0
Cracking/De-compile Open JAR Files: A Developer’s Guide to De-compiling | by Chandima Veneera Rathnayake | Medium
July 12, 2023 - Locate the JAR file you want to decompile and create a new folder where you want to extract its contents. Right-click on the JAR file and select “Extract Here” or “Extract to folder” to extract the files. Open your IDE of choice, whether ...
Find elsewhere
🌐
GitHub
github.com › JetBrains › fernflower
GitHub - JetBrains/fernflower: Decompiler from Java bytecode to Java, used in IntelliJ IDEA.
The Fernflower IDE plugin is bundled in IntelliJ IDEA. Open any .class file and you should see the decompiled Java source code: this is Fernflower in action. The plugin is also open-source and can be found here. java -jar fernflower.jar ...
Starred by 4.1K users
Forked by 716 users
Languages   Java
🌐
Uprootsecurity
uprootsecurity.com › blog › decompile-jar-files-java-guide
How to Decompile JAR Files: Guide for Java Developers
August 7, 2025 - You can switch between them based on your needs. FernFlower is highly compatible with modern Java versions, while JD is known for speed and readability. IntelliJ IDEA includes a decompiler out of the box.
🌐
YouTube
youtube.com › codergrammer
DECOMPILE Java Easily in IntelliJ or With javap - YouTube
Decompile Java Easily in IntelliJ or With javapIn this video I go through how to view bytecode, interpreted bytecode and decompiled code in IntelliJ and inte...
Published   April 9, 2022
Views   5K
🌐
Jamie Tanna
jvt.me › posts › 2021 › 12 › 20 › java-decompile-command-line
Decompiling Java Class Files On the Command-Line · Jamie Tanna | Software Engineer
December 20, 2021 - If you have IntelliJ installed, you can find it present in the plugins/java-decompiler/lib/java-decompiler.jar path within your IntelliJ installation.
🌐
Reddit
reddit.com › r/intellijidea › visually edit decompiled class file?
r/IntelliJIDEA on Reddit: Visually Edit Decompiled Class File?
March 3, 2022 -

I'm working with Minecraft source code, which is a massive library of decompiled files all stored as .class files. I often find myself struggling to understand the code with some of the decompiler's additions, such as casting an object four times in a single block. Some variables are also unnamed, and I have to keep track of what some unnamed variables mean on a pad of paper.

I obviously don't mean to edit the content of the class file and how it functions directly, but since IDEA opens the files in read-only mode, I can't even make notes or anything.

Is there any way to visually edit a decompiled file's text in the editor without changing the file itself? (Preferably without having to make a copy of the file in your own source code.)

🌐
Reddit
reddit.com › r/java › new open source java decompiler
r/java on Reddit: New open source Java decompiler
April 29, 2022 -

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.

🌐
YouTube
youtube.com › watch
IntelliJ IDEA Tips & Tricks #56: Easiest way to Decompile Java Bytecodes in .class Files - YouTube
Java Compilation is the process of converting the source program to bytecodes stored in .class files that are executable by the Java virtual machine. Decompi...
Published   December 21, 2020
🌐
YouTube
youtube.com › watch
Getting Started with Java: Intellij Decompiler - YouTube
In this lesson, we are going to look at the decompiler that ships with IntelliJ and discuss what it is and why we might use it. CONNECT WITH ME: Website: htt...
Published   January 12, 2019
🌐
Codemia
codemia.io › knowledge-hub › path › how_to_decompile_a_whole_jar_file
How to decompile a whole Jar file?
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises
🌐
JetBrains
blog.jetbrains.com › idea › 2020 › 03 › java-bytecode-decompiler
Look Inside Compiled Code with Java Bytecode Decompiler | The IntelliJ IDEA Blog
December 13, 2023 - However, if you open the same file in IntelliJ IDEA, the IDE shows you the human-readable Java code from your .jar, without actually converting .class files into .java files. The notification panel above the editor informs you that you’re reading a decompiled .class file.
🌐
JetBrains
youtrack.jetbrains.com › issue › IDEA-175638 › Please-release-fernflower-decompiler-as-a-standalone-jar
Please release fernflower decompiler as a standalone jar
{{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong