Skip to content

Support JDK v26 #1234

Description

@donalmurtagh

Description:
Installing the JDK failed after I upgraded from v25 to v26

Task version:
v5.7.0

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:

- name: Setup JDK
  uses: actions/setup-java@v5.7.0
  with:
    java-version-file: '.sdkmanrc'
    cache: gradle

In .sdkmanrc I made this change

# java=25.0.3-tem
java=26-tem

In build.gradle I also upgraded from v25 to v26

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(26)
    }
}

Expected behavior:
JDK v26 should install successfully

Actual behavior:
JDK v26 installation fails with the following error

3: Task failed with an exception.
-----------
* What went wrong:
Failed to notify build listener.
> Could not resolve all dependencies for configuration ':core:compileClasspath'.
   > Failed to calculate the value of task ':core:compileJava' property 'javaCompiler'.
      > Cannot find a Java installation on your machine (Linux 6.17.0-1020-azure amd64) matching: {languageVersion=26, vendor=any vendor, implementation=vendor-specific, nativeImageCapable=false}. Toolchain download repositories have not been configured.
> There is 1 more failure with an identical cause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions