setup-java
setup-java copied to clipboard
Specify distribution via java-version-file
Currently, setup-java requires distribution field. However, one can specify a distribution in .java-version thus the distribution input field can be redundant or even confusing when these two disagree.
It'd be great if distribution field is optional and can be configured via .java-version file.
Hello @tsawada 👋, Thank you for this feature request. We will investigate it and get back to you as soon as we have some feedback.
Hi @tsawada , have you checked to not use a distribution in the yml file?
To me the following should work and use a recent temurin 21 release
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
- run: java HelloWorldApp.java
Regards Christian