Error: Unable to find the latest Java version for '11'
Hi guys,
I'm trying to use this action with the follwing options:
- uses: graalvm/setup-graalvm@v1
with:
java-version: '11'
distribution: 'graalvm-community'
components: 'native-image'
version: '22.3.3'
and it fails with:
Error: Unable to find the latest Java version for '11'. Please make sure the java-version is set correctly.
If you think this is a mistake, please file an issue at: https://github.com/graalvm/setup-graalvm/issues.
Any ideas?
Hi @sanel, could you provide us with a link to the failing build? Also, it may help if you restart the build and enable debugging.
Just for the record, GraalVM CE 22.3.3 is here.
Sure @fniephaus:
- https://github.com/sanel/jarbloat/actions/runs/10880037034
- https://github.com/sanel/jarbloat/actions/runs/10880254005
I'm a bit new to GH actions, how to enable debugging? I've reverted workflows to use ayltai/setup-graalvm@v1 which worked before.
Let me know if you need anything else :)
Thanks for sharing those links, @sanel. You can turn on debugging when you restart a build job (there's a checkbox for that).
Anyway, it seems the problem is that you're trying to use GraalVM CE JDK 11, which is quite old and unsupported. The build may actually work if you're using:
- uses: graalvm/setup-graalvm@v1
with:
java-version: '11'
components: 'native-image'
version: '22.3.3'
Note the missing distribution property.
Do you really need to use JDK 11 or could you just upgrade to JDK 17, if not JDK 21?