Fernflower and IntelliJ IDEA java decompiler

I am trying to understand how to use the Fernflower Java decompiler.

I can find java-decompiler.jar in the following place:

 ~/idea-IC-162.1628.40/plugins/java-decompiler/lib/java-decompiler.jar 

However, no fernflower.jar . I guess this is because the functionality was folded in java-compiler.jar , and Fernflower README just didn't update after 2 years.

If I run the following:

 java -jar ~/idea-IC-162.1628.40/plugins/java-decompiler/lib/java-decompiler.jar myclassfile.class . 

I get

there is no main attribute of the manifest, in / home // idea -IC-162.1628.40 / plugins / java-decompiler / lib / java-decompiler.jar

Has IntelliJ stopped supporting command-line decompilation support, or am I not seeing something here?

+6
source share
1 answer

Try manually calling the main class org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler

 java -cp java-decompiler.jar org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler myclassfile.class . 

You can also learn more about the internal use of Fernflower inside IDEA by request in the source code https://github.com/JetBrains/intellij-community/search?utf8=%E2%9C%93&q=Fernflower

+9
source

All Articles