Skip to content

Java version 18.0.1.1 not supported as input value #326

Description

@sormuras

Description:

As https://github.com/actions/setup-java/blob/main/README.md#supported-version-syntax states:

Supported version syntax
The java-version input supports an exact version or a version range using SemVer notation:

major versions: 8, 11, 16, 17
more specific versions: 17.0, 11.0, 11.0.4, 8.0.232, 8.0.282+8
early access (EA) versions: 15-ea, 15.0.0-ea, 15.0.0-ea.2, 15.0.0+2-ea

This definition and examples seem to support 18.0.1.1 as an exact version or specific version.

Find the representation of a version string for an implementation of the Java SE Platform described as

  • $FEATURE.$INTERIM.$UPDATE.$PATCH

here: https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/Runtime.Version.html

Task version:
v3

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted (not tested)

Repro steps:
Run a distribution: jdkfile-based installation and pass java-version: 18.0.1.1 input.
See oracle-actions/setup-java#25 for repro steps and details of failing runs.

Expected behavior:
An exact/specific version like 18.0.1.1 is supported.

Actual behavior:

Run actions/setup-java@v3
  with:
    java-version: 18.0.1.1
    distribution: jdkfile
    jdkFile: /home/runner/.oracle-actions/setup-java/3eac1378/openjdk-18.0.1.1_linux-x64_bin.tar.gz
    java-package: jdk
    architecture: x64
    check-latest: false
    ...
Error: The string '18.0.1.1' is not valid SemVer notation for a Java version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    distributionJDK distribution/version/source supportfeature requestNew feature or request to improve the current logic

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions