As the author has forgotten to add a detailed usage listing
No, I haven't :) See readme.txt in your jar for the full documentation.
Answer from Stiver on Stack OverflowVideos
As the author has forgotten to add a detailed usage listing
No, I haven't :) See readme.txt in your jar for the full documentation.
Current source code and documentation of Fernflower is available here: https://github.com/fesh0r/fernflower
Command line options are listed there, I do not copy-paste them from github.
Online version of Fernflower is now available on this site: http://www.javadecompilers.com/
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
You can get it looking at JetBrains releases: https://www.jetbrains.com/intellij-repository/releases/
Download the java-decompiler-engine.jar which will actually have the version name, but for simplicity I'll save it as c:\t\dl\jde.jar on my pc.
Then this for example will decompile the jar file for the game Necesse where I have it installed on my PC. The output seems to go into a jar file with the same name in the directory specified, here creating c:\t\Necesse.jar with the .java files in it (command split into lines for readability):
java -cp c:\t\dl\jde.jar
org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler
'c:\games\steam\steamapps\common\Necesse\Necesse.jar'
c:\t
I found that on OSX you can change this setting in the following file:
~/Library/Preferences/IntelliJIdea2016.1/options/options.xml
Add the following properties:
<property name="decompiler.use.line.mapping" value="true" />
<property name="decompiler.dump.original.lines" value="true" />
ok, as there are no news regarding this, I've created a little plugin which decompiles the jar file with compiled code to new *-sources.jar file using build-in Intellij fernflower decompiler and attaches sources to project. anyone interested, can take a look at decompile and attach plugin in jetbrains plugin repository
Update
answering my question about line numbers in decompiled code using fernflower. I found 'decompiler.use.line.table' flag in Intellij's fernflower which preserves line numbers.