java release version jdk 21 not supported

bruce-mig
TRIAL

2 years ago

i have a Spring Boot app that is using jdk 21. it works fine locally. but on Railway my build fails with error Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project content-calendar: Fatal error compiling: error: release version 21 not supported -> [Help 1]. I would like to know which java versions are supported on Railway.

To reproduce, try building a project with jdk 21 on railway.

View Deploy details

ⓘ Deployment information is only viewable by Project members and Railway admins.

5 Replies

2 years ago

Please see the nixpacks docs here -

https://nixpacks.com/docs/providers/java#setup


hypad590
TRIAL

a year ago

how will this nixpacks help?


a year ago

Railway uses nixpacks to build your app.


robdann
HOBBY

5 months ago

The docs say 21 is available, but it fails saying it is not: error: invalid target release: 21


robdann

The docs say 21 is available, but it fails saying it is not: error: invalid target release: 21

andriuslau
HOBBY

a month ago

-