I decompiled an apk file using dex2jar and opened the resulting jar file in jd-gui. I can view almost all of the code nicely but one section - the constants - displays only // INTERNAL ERROR //
and nothing else. Is there a way to retrieve the constants?
Asked
Active
Viewed 5.9k times
41

blizz
- 4,102
- 6
- 36
- 60
-
Which version of jd-gui and which version of Java are you running? Have you tried running `javap`? Decompiler compatibility changes with every new Java release. – ngreen Mar 20 '14 at 15:39
-
Try luyten / bytecode-viewer – Gaurav Apr 19 '19 at 10:34
3 Answers
96
Anyone passing by this question should look at this instead: https://github.com/deathmarine/Luyten
Using this instead of jd-gui, I was able to successully view all code which showed as INTERNAL ERROR on jd-gui.
You can also try Jadx: https://github.com/skylot/jadx

blizz
- 4,102
- 6
- 36
- 60
-
Luyten doesn't allow to open directory (eg. several `.class` files in directory structure). It only works in jar files, therefore not useful to me. – Tomáš Zato Feb 09 '16 at 11:54
-
@TomášZato you can build a jar file yourself. Just put the whole directory structure into a zip file and rename it to jar. – James Watkins May 27 '16 at 23:45
-
OK but jd-gui can decompile wars and the libs in it are linked. In Luyten if we put all the jar content in zip and rename to jar then we can see the classes but the jars in the lib can not be decompiled. – Xelian May 30 '16 at 15:52
-
Jadx works very well. Luyten didn't display the lambda classes which was viewable in Jadx and somewhat in JD-GUI. – E. Sundin Jun 13 '16 at 01:18
-
luyten doesn't have a type search (ctrl+T) which is essential And jadx didn't decompile just showed a node with Source Code and nothing more – sam Feb 22 '17 at 08:28
-
They both display unicode character(in my case, Chinese) as \uxxxx but I want to see the real character. jd-gui doesn't has this problem. By the way, When I use jd-gui 1.4, it has this "internal error" problem but when I switch back to o.3.6 it works well. Does anyone know why? (note: I'm using Win7 64bit) – Scott Chu Mar 08 '17 at 10:21
-
-
JD-GUI wasn't able to handle files of mine that had a large range of FX bindings and lambdas - Luyten was the way to go – Peter Nov 25 '17 at 19:54
-
I downloaded the jar directly from https://github.com/deathmarine/Luyten/releases and it works like a charm! Thanks!! – e_v_e Dec 08 '17 at 20:01
-
1I think Luyten has a shortcoming. I tried opening a war file and in its tiny taskbar it says File is too large : 76.5 MB – happybuddha Feb 26 '19 at 06:36
-
Luyten worked like a charm! JD-GUI could not do it for me. Big upvote! – yetAnotherCoder May 21 '19 at 23:49
0
I had faced similar issue and it worked after updating Java Decompiler.
Please download latest version. http://java-decompiler.github.io/

Kaustubha M
- 11
- 1
-
Please put some effort to explain your answer. That would really help others who are troubleshooting similar problems – Imdad Sep 04 '20 at 11:46