Self-hosted runners for java projects

I am trying to use a gitea action to build my java project (for now a simple hello world) with actions/setup-java@v4. However, no matter what distribution or version I use, the setup always completes, but my build job fails with “cannot execute: required file not found”.

This is my sample yml:

name: java
on: [push]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-java@v4
      with:
        distribution: 'temurin' # See 'Supported distributions' for available options
        java-version: '21'

Again, apologies for the mismatched version numbers throughout the post, but I was exploring versions. This was confirming PATH and javac were correct. Not pictured is failed build job, but error message was given above:

Any help would be fantastic. I ended up just installing a JDK in my runner’s pod, but it was my understanding the “runs-on” directive determines the job’s runtime environment.

Thank you!