# Self-hosted runners for java projects

**URL:** <https://forum.gitea.com/t/self-hosted-runners-for-java-projects/10070>\
**Category:** Actions\
**Created:** [November 19, 2024, 4:25am UTC](https://forum.gitea.com/t/self-hosted-runners-for-java-projects/10070 "2024-11-19T04:25:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nightgla55](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/nightgla55/32/6422_2.png) [@nightgla55](https://forum.gitea.com/u/nightgla55)\
**Post date:** [November 19, 2024, 4:25am UTC](https://forum.gitea.com/t/self-hosted-runners-for-java-projects/10070/1 "2024-11-19T04:25:08Z")

</div>

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:

```auto
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:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/2/247fe19d0087df3a0baaaad3ddf9ae8e50e3480f.png)

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!
