Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fernflower and IntelliJ IDEA's java-decompiler

I'm trying to figure out how to use the Fernflower Java decompiler.

I can find java-decompiler.jar at the following location:

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

There is no fernflower.jar, however. I assume this is because the functionality has been folded into java-compiler.jar, and the Fernflower README has simply not been updated in 2 years.

When I run the following, however:

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

I get

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?

like image 249
Tianxiang Xiong Avatar asked Oct 05 '16 02:10

Tianxiang Xiong


People also ask

Does IntelliJ have a Java decompiler?

IntelliJ IDEA features the Java bytecode decompiler that shows you compiled bytecode as if it were human-readable Java code. The decompiler is enabled by default. Open a compiled . class file in the editor.


1 Answers

Try to invoke main class org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler manually

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

Also you can find more about internal usage of Fernflower inside IDEA by query in source code https://github.com/JetBrains/intellij-community/search?utf8=%E2%9C%93&q=Fernflower

like image 67
qwazer Avatar answered Sep 26 '22 03:09

qwazer