IntelliJ IDEA, a JetBrains IDE
banner
intellijidea.com
IntelliJ IDEA, a JetBrains IDE
@intellijidea.com
IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin, by @jetbrains.com

Tips: #IntelliJIDEATips
New Features: #NewInIntelliJIDEA

Our YouTube channel: http://jb.gg/video
Fernflower is open-source software available at github.com/JetBrains/fe....

If you find it helpful, give it a star! ⭐️
GitHub - JetBrains/fernflower: Decompiler from Java bytecode to Java, used in IntelliJ IDEA.
Decompiler from Java bytecode to Java, used in IntelliJ IDEA. - JetBrains/fernflower
github.com
October 10, 2025 at 7:02 AM
Simply run `fernflower Calculator.class <output-directory>`,
and Fernflower will analyze the .class file and recreate a .java file.
October 10, 2025 at 7:02 AM
There's also the `javap` program, which comes with the JDK.
It can display classes, fields, and method signatures nicely,
but if you want to see the contents of method bodies, you need to use the `-c` flag.
Its output is hard to read and understand.

Fernflower to the rescue!
October 10, 2025 at 7:02 AM
Let's say you have a compiled calculator program in a Calculator.class file.

Java bytecode in .class files is stored in a special binary format,
which is unreadable with a normal `cat` program.
October 10, 2025 at 7:01 AM
Fernflower is a Java bytecode decompiler.
It can recreate a .java file from a .class file (which contains compiled Java bytecode).
This is useful in the context of reverse engineering, when you need to see the source code of a library but you only have access to its JAR.
October 10, 2025 at 7:01 AM