Skip to content

Java

Railpack builds and deploys Java (including Spring Boot) applications built with Gradle or Maven.

Detection

Your project will be detected as a Java application if any of these conditions are met:

  • A build.gradle file exists in the root directory
  • A pom.{xml,atom,clj,groovy,rb,scala,yaml,yml} file exists in the root directory

Versions

The Java version is determined in the following order:

  • Set via the RAILPACK_JDK_VERSION environment variable
  • If the project uses Gradle <= 5, Java 8 is used
  • Defaults to 21

Config Variables

VariableDescriptionExample
RAILPACK_JDK_VERSIONOverride the JDK version17
RAILPACK_GRADLE_VERSIONOverride the Gradle version8.5