Java issue while running a project on Jenkins

Running as SYSTEM Building in workspace /Users/mac/.jenkins/workspace/trainSchedule The recommended git tool is: NONE No credentials specified

git rev-parse --resolve-git-dir /Users/mac/.jenkins/workspace/trainSchedule/.git # timeout=10 Fetching changes from the remote Git repository git config remote.origin.url GitHub - linuxacademy/cicd-pipeline-train-schedule-jenkins: Train Schedule sample app for Jenkins exercises # timeout=10 Fetching upstream changes from GitHub - linuxacademy/cicd-pipeline-train-schedule-jenkins: Train Schedule sample app for Jenkins exercises git --version # timeout=10 git --version # ‘git version 2.30.1 (Apple Git-130)’ git fetch --tags --force --progress – GitHub - linuxacademy/cicd-pipeline-train-schedule-jenkins: Train Schedule sample app for Jenkins exercises +refs/heads/:refs/remotes/origin/ # timeout=10 git rev-parse refs/remotes/origin/master^{commit} # timeout=10 Checking out Revision 1603f84d1f50794623c71673920fc3111280045f (refs/remotes/origin/master) git config core.sparsecheckout # timeout=10 git checkout -f 1603f84d1f50794623c71673920fc3111280045f # timeout=10 Commit message: “specify a newer version of node and npm” First time build. Skipping changelog. [Gradle] - Launching build. [trainSchedule] $ /Users/mac/.jenkins/workspace/trainSchedule/gradlew build

FAILURE: Build failed with an exception.

  • What went wrong: Could not determine java version from ‘19’.
  • 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 step ‘Invoke Gradle script’ changed build result to FAILURE Build step ‘Invoke Gradle script’ marked build as failure Archiving artifacts Finished: FAILURE

You try to run Gradle using Java 19
https://docs.gradle.org/current/userguide/compatibility.html