Skip to content

Unsupported class file major version 61 (Java 17) #3

@kamko

Description

@kamko

Hello,

when trying to attach to Java 17 application it fails with several errors (probably trying to read multiple class files) but the common error is:

java.lang.IllegalArgumentException: Unsupported class file major version 61
	at tech.httptoolkit.relocated.org.objectweb.asm.ClassReader.<init>(ClassReader.java:10)
	at tech.httptoolkit.relocated.org.objectweb.asm.ClassReader.<init>(ClassReader.java:2)
	at tech.httptoolkit.relocated.org.objectweb.asm.ClassReader.<init>(ClassReader.java:1)
	at tech.httptoolkit.relocated.net.bytebuddy.utility.OpenedClassReader.of(OpenedClassReader.java:359)

The agent currently uses bytebuddy 1.10.20
https://github.com/httptoolkit/jvm-http-proxy-agent/blob/main/build.gradle#L32

As Java 17 ASM is supported from 1.10.21 upwards updating bytebuddy should suffice (and maybe also other dependencies).

If you give me a hint how I can test that this won't break anything locally I could provide the PR (not really complex one as it will probably just update dependencies).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions