Fernflower 和 IntelliJ IDEA 的 java 反编译器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39864346/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Fernflower and IntelliJ IDEA's java-decompiler
提问by Tianxiang Xiong
I'm trying to figure out how to use the FernflowerJava decompiler.
我想弄清楚如何使用FernflowerJava 反编译器。
I can find java-decompiler.jar
at the following location:
我可以java-decompiler.jar
在以下位置找到:
~/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.
fernflower.jar
然而,没有。我认为这是因为功能已被折叠到java-compiler.jar
.
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
没有主要清单属性,在 /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?
IntelliJ 是否停止支持基于命令行的反编译,或者我在这里遗漏了什么?
回答by popalka
Try to invoke main class org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler
manually
尝试org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler
手动调用主类
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
您也可以通过在源代码中查询 https://github.com/JetBrains/intellij-community/search?utf8=%E2%9C%93&q=Fernflower