Recaf icon indicating copy to clipboard operation
Recaf copied to clipboard

Unsupported class file major version 65

Open cconde opened this issue 1 year ago • 1 comments

Issue

I'm receiving unexpected message: Unsupported class file major version 65

I can't send sample as I can't distribute the jar I'm trying to open, sorry. Just after opening the jar I want to edit it I get that exception, and bytecode editing with assembler fails.

Probably I'm doing wrong, but I tested with different JDKs and I'm lost what to do next.

Exception

19:02:09.739 [ForkJoinPool-1-worker-2] DEBUG: Begin generating phantom classes, given 261 input classes
19:02:09.769 [ForkJoinPool-1-worker-2] ERROR: Failed to analyze phantom references for primary resource
java.lang.IllegalArgumentException: Unsupported class file major version 65
        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:199)
        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:180)
        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:166)
        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:298)
        at me.coley.recaf.workspace.PhantomResource.createMembers(PhantomResource.java:121)
        at me.coley.recaf.workspace.PhantomResource.populatePhantoms(PhantomResource.java:78)
        at me.coley.recaf.workspace.Workspace.lambda$analyzePhantoms$0(Workspace.java:160)
        at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1403)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)```

cconde avatar Mar 27 '24 18:03 cconde

Update ASM version in build file. 2.x version is not supported.

xxDark avatar Mar 27 '24 18:03 xxDark

Recaf 2.21.4 will be the last iteration of 2.X until we stabilize 4.X. It has an updated ASM that should address this.

Col-E avatar May 19 '24 21:05 Col-E