setup-java icon indicating copy to clipboard operation
setup-java copied to clipboard

Specify distribution via java-version-file

Open tsawada opened this issue 1 year ago • 2 comments

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.

tsawada avatar Jul 18 '24 08:07 tsawada

Hello @tsawada 👋, Thank you for this feature request. We will investigate it and get back to you as soon as we have some feedback.

priya-kinthali avatar Jul 18 '24 08:07 priya-kinthali

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

skateball avatar Feb 11 '25 21:02 skateball