I have an AOT uberjar app that includes a dependency on a multi-release jar. The resulting uberjar includes the wrong (Java 8) version of the class from the dep when I want the Java 21 variant. Is there a way to do this?
I’m building/running on JDK24, and am fine doing things like javac-options -target “21”, but so far I’ve not found options that work
I forget exactly how multi release jars work, but I think it is a subfolder thing along with an attribute set in the jars manifest. Uberjaring is mostly just copying stuff over, so likely the subfolder stuff is intact in your uberjar. If that is the case adding the multi release properly to the uberjars manifest might "just work"
iirc I did some small change in tools.build to mark the manifest as Multi-Release if any of the jars had a META-INF/versions dir
that's probably all that's needed if it's not in there
> Uberjaring is mostly just copying stuff over, It is indeed there, I see what I need under META-INF/versions/21. Ty!
> that’s probably all that’s needed if it’s not in there Ty, im adding that to my manifest now
to my project.clj worked. Ty both @hiredman and @alexmiller