btrace
btrace copied to clipboard
Unsupported class file major version 29281
Hello,
I am getting the following when I am trying to start my Java Application via the command line. I have built the app on JDK 16, and I am starting it on JDK 16. Using the Brace 2.2.2 download from GitHub. I am running this in an Apple Silicon Mac.
What version of Java do I need to use?
Hm. It seems that when I run BTrace with -javaagent, and use the scriptdir command, it picks up any file in that directory. Not only .class files. So the file .DS_Store (that gets automatically generated on Macs for each folder), is picked up and attempted to load into the Java application.
This is very strange - there is definitely no version 29281 of the java class format.
Can you provide the exact steps to reproduce, please?
Hello,
Looking at this, it seems that BTrace attempts to pick up any file in the scriptdir directory, so when it tries to pick up this ".DS_Store" file, it throws that exception.

I think there ought to be a filter that filters out anything not ending with .class when loading script files from a directory.
Created PR: https://github.com/btraceio/btrace/pull/580
Stale issue message