Java 21 Support?

As title say, is there plans to support java 21 as its newest LTS version.
22 Replies
Percy
Percy12mo ago
Project ID: 0f4858db-976c-4f1a-91ea-0ba1b5fc740a
Mafiaboss
MafiabossOP12mo ago
0f4858db-976c-4f1a-91ea-0ba1b5fc740a
root
root12mo ago
Oh, that's not good. I'll PR a fix. I did not realize that Nixpacks's JDK versions were capped at 19 I have opened a PR, hopefully it'll be merged soon.
Mafiaboss
MafiabossOP12mo ago
Thank you very much. Please let me know in this thread when your PR get merged
Frugo
Frugo11mo ago
Any update on this? I'm trying to deploy a chess app (lichess fork) and it requires JDK 21 as well 😦 Pinging @aleks as most of my hope lies in your PR 😁
root
root11mo ago
(this became somebody else's PR a while ago, actually: https://github.com/railwayapp/nixpacks/pull/1020) It looks like we're just waiting for a new Nixpacks release at this point
Frugo
Frugo11mo ago
Cool, thanks for the info!
Matúš Olejník
Matúš Olejník10mo ago
Hello guys, does java 21 work for you? Documentation says: The following major JDK versions are available 21. I have set NIXPACKS_JDK_VERSION to 21 but still getting Error: Unsupported JDK version: 21
Brody
Brody10mo ago
what nixpacks version is your build running with?
Matúš Olejník
Matúš Olejník10mo ago
In build logs there is Using Nixpacks Nixpacks v1.20.0 oh I see now, how can I change it to 1.21.0?
Brody
Brody10mo ago
nixpacks may have had a new release but railway doesn't automatically use the latest, this is something railway has to change over cc @jr
jr
jr10mo ago
It will be updated on Railway tomorrow. In the meantime you can add a railway.json file and manually set the nixpacks version
{
"build": { "nixpacksVersion": "1.21.0" }
}
{
"build": { "nixpacksVersion": "1.21.0" }
}
Brody
Brody10mo ago
oh wow, I knew you could set the version lower, didn't know you could set it higher
Matúš Olejník
Matúš Olejník10mo ago
wow thank you guys, you are the best, I will try later 🍻 hello guys, sorry for asking again, but I have tried to set "build": { "nixpacksVersion": "1.21.0" in my railway.json, but my builds failing with errors [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.12.1:compile (default-compile) on project domain: Fatal error compiling: error: release version 21 not supported ERROR: failed to solve: process "/bin/bash -ol pipefail -c mvn -DoutputFile=target/mvn-dependency-list.log -B -DskipTests clean dependency:list install" did not complete successfully: exit code: 1 Locally builds and everything is OK, should I just wait to official Railway Nixpacks update? 🙂
Brody
Brody10mo ago
what version of the sdk was being installed? but also, you could have ran your app with java 21 on railway the day java 21 came out, you just need to write a Dockerfile
Matúš Olejník
Matúš Olejník10mo ago
I found only this in logs Nixpacks v1.21.0 setup │ jdk21, maven I have tried Dockerfile too but I am so noob with that, that is why I am trying to not use Dockerfile (what if I miss something important etc.), but I am learning 😄
Brody
Brody10mo ago
think it might be best to give a Dockerfile another go
Matúš Olejník
Matúš Olejník10mo ago
okey thank you, I have found template in markeplace for java 20 so maybe it will help
Brody
Brody10mo ago
sounds good!
jr
jr10mo ago
Can you share more of the build logs when you get a chance? Or share a link to a deployment. Java 21 should be possible
Matúš Olejník
Matúš Olejník10mo ago
this is basically the whole log
Brody
Brody10mo ago
@aleks - java help
Want results from more Discord servers?
Add your server