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

New computer, need to convert a file that is a jar to a editable file
It's often possible to decompile jar files to Java, look up the Fernflower decompiler. But you should know that for any nontrivial project it can be a lot of work, and the code you get will not be the code you wrote, but a functionally identical mess. It's probably not what you want. More on reddit.com
🌐 r/IntelliJIDEA
3
0
December 19, 2022
java - Decompile jar file to use it as a project in intellij - Stack Overflow
I have a jar file but not source code. I had some issue with this code which is not working as expected. So I want to decompile it use it as a project in intellij. Could you please let me know how ... More on stackoverflow.com
🌐 stackoverflow.com
IntelliJ 14 can decompile code... can I use it to quickly decompile my apk?
No. It decomplies .class files. Your apk has a .dex file which has all of your .class's in it. Why would you ever need to decompile your own apk? More on reddit.com
🌐 r/androiddev
21
15
February 24, 2015
Java Decompiler Gui
JD-GUI? http://java-decompiler.github.io/ More on reddit.com
🌐 r/java
30
53
June 26, 2022
🌐
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 ...
🌐
Uprootsecurity
uprootsecurity.com › blog › decompile-jar-files-java-guide
How to Decompile JAR Files: Guide for Java Developers
July 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.
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 715 users
Languages   Java
🌐
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.
🌐
Java Decompiler
java-decompiler.github.io
Java Decompiler
The “Java Decompiler project” aims to develop tools in order to decompile and analyze Java 5 “byte code” and the later versions.
🌐
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
🌐
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
🌐
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.
🌐
GitHub
github.com › JetBrains › intellij-community › blob › master › plugins › java-decompiler › engine › README.md
intellij-community/plugins/java-decompiler/engine/README.md at master · JetBrains/intellij-community
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 ...
Author   JetBrains
🌐
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
🌐
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