Skip to content

0.2.25 was bulit with java 24 as target level #818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
turing85 opened this issue Apr 15, 2025 · 1 comment
Open

0.2.25 was bulit with java 24 as target level #818

turing85 opened this issue Apr 15, 2025 · 1 comment

Comments

@turing85
Copy link

Hello!
We tried to upgrade jsch from 0.2.24 to 0.2.25 and got the following:

org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: URL [jar:file:/opt/osiris/spring-boot/app.jar!/META-INF/versions/24/com/jcraft/jsch/jce/MLKEM.class]; nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 68

I see that the java-version was changed to 24 in 303785b. It looks to me as if the target level should be configured to still be 21 (or 17?).

it would be nice to have releases that use an LTS-version as target level.

@norrisjeremy
Copy link
Contributor

Hi @turing85,

JSch uses a multi-release jar-file. Some parts of it are compiled specifically targeting Java 24 in order to support some new features, but the base part of the library still targets Java 8 and is still fully usable with Java 8 (we fully test this with all of our unit & integration tests run in Github Actions CI).

I'm not sure why your Spring app is attempting to use ASM to read the Java 24 part of the multi-release jar-file, but I would recommend taking it up with the Spring development team.
Or you could simply update the version of ASM you are using, as the latest release fully supports Java 24 class files.

Thanks,
Jeremy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants