24

I see that most of the Java decompilers support till Java 7.

Are there any decompilers which support Java 8 - especially Lambda expressions?

I want to run such a decompiler in my ubuntu machine.

Blackbam
  • 17,496
  • 26
  • 97
  • 150
Omkar Shetkar
  • 3,488
  • 5
  • 35
  • 50
  • JD doesn't seem to support Java 8 fully. Its online decompiler giving error! This can be found at http://jd.benow.ca/ – Omkar Shetkar Oct 10 '14 at 18:02
  • Trying to run JAD but getting following error: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory – Omkar Shetkar Oct 10 '14 at 18:03
  • I don't know why the earlier answer suggesting JD and JAD decompilers got disappeared from this thread... – Omkar Shetkar Oct 10 '14 at 18:04
  • Luyten decompiler providers good java 8 support and had GUI viewer https://github.com/deathmarine/Luyten – Priyal Jun 15 '18 at 10:49

1 Answers1

41

Procyon and CFR both support Java 8 language features, including lambda expessions and method references.

Mike Strobel
  • 25,075
  • 57
  • 69
  • 3
    Excellent! Both of the decompilers support almost Java 8. Tested both of them. CFR seems to support more features or stable than Procyon. Especially streams feature in Java 8 got decompiled perfectly with CFR as against with Procyon. – Omkar Shetkar Oct 12 '14 at 08:12
  • 1
    Procyon console outputs with syntax highlight as against plain text output by CFR. – Omkar Shetkar Oct 12 '14 at 08:15
  • 4
    If I may ask, what worked better with CFR? I am the author of Procyon and would appreciate feedback if you ran into less than optimal results. Feel free to post to our issue tracker on BitBucket! – Mike Strobel Oct 13 '14 at 15:31
  • 1
    I have raised an issue regarding this in BitBucket: https://bitbucket.org/mstrobel/procyon/issue/214/java-8-decompiled-class-is-not-matching Thanks @Mike Strobel for your answer. – Omkar Shetkar Oct 14 '14 at 16:40
  • 2
    I just 'java -jar cfr_0_115.jar Logout.class' and worked nicely. – osmingo Mar 16 '16 at 11:28
  • 1
    Java Decompiler Gui for Procyon: https://github.com/deathmarine/Luyten/releases – qxo May 16 '17 at 01:29
  • 3
    I don't understand why the topic is closed - Thanks Mike; CFR really works nice for me. – Peter Aug 16 '17 at 08:28
  • CFR has better support for JDK >= 8 – Chad Jun 21 '18 at 04:56