kaikramer / keystore-explorer

KeyStore Explorer is a free GUI replacement for the Java command-line utilities keytool and jarsigner.
https://keystore-explorer.org/
GNU General Public License v3.0
1.7k stars 275 forks source link

Make it compatible with Java 22 #495

Closed ogarcia closed 7 months ago

ogarcia commented 7 months ago

This is more a wish than a bug, it would simply be that it could be compiled and executed with Java 22 (is the default version that Arch Linux installs right now). Currently if you try to compile it with Java 22 it gives the following error.

Welcome to Gradle 8.7!

Here are the highlights of this release:
 - Compiling and testing with Java 22
 - Cacheable Groovy script compilation
 - New methods in lazy collection properties

For more details see https://docs.gradle.org/8.7/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 66
> Unsupported class file major version 66

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 1s
jpstotz commented 7 months ago

I am not sure if this is possible. According to the Gradle Compatibility Matrix there is no Gradle version available that runs on Java 22 (if I do not misinterpret the matrix).

ogarcia commented 7 months ago

@jpstotz yes, it is clear that it is not yet compatible :cry: :

A Java version between 8 and 21 is required to execute Gradle. Java 22 and later versions are not yet supported.

There is not much to do as long as Gradle cannot be used with Java 22. I don't know if you want to close this issue or keep it open for the future.

kaikramer commented 7 months ago

There is not much to do as long as Gradle cannot be used with Java 22. I don't know if you want to close this issue or keep it open for the future.

Well, this is a general problem of Gradle and the only thing that has to change to make it work is that a new Gradle version is released that is fully compatible with Java 22.

For KSE there is nothing to do here, therefore I will close this issue.

But thank you for bringing our attention to this problem! It's always better to know if something is not working.

kaikramer commented 7 months ago

I have updated the included Gradle wrapper from 8.5 to 8.7 just to make sure that there are incompatibilities in the build script.

ogarcia commented 7 months ago

But thank you for bringing our attention to this problem! It's always better to know if something is not working.

Yes, thanks to this we have discovered a minor problem in the packaging (which is already solved) of Gradle on Arch Linux.

Thank you all very much.