java-decompiler / jd-gui

A standalone Java Decompiler GUI
GNU General Public License v3.0
14.09k stars 2.4k forks source link

unsupported class file major version 60 #368

Open MushtaqAlvi opened 3 years ago

MushtaqAlvi commented 3 years ago

I have install jdk16 and javap is also working correctly but i dont know why jd-gui shows this exception in console when opening class compiled with jdk16

bibz0r commented 1 year ago

After a few hours of debugging I was able to somehow circumvent this error. I simply changed the "Version of Class File Format" with an hex editor (byte offset 6-7) from:

3B (decimal: 59)

to

36 (decimal: 36)

saved the file and it started. it will now also load the other files, which have not been changed. I presume I messed up my windows path or something like that, since I have had multiple java versions installed.

This is the part where you need to change the aforementioned value:

image

(hex editor in this case was HxD)

careful though, probably some code might get decompiled incorrectly since 36 equals to Java SE 10.. so quite some big version jumps in there)