Skip to content

corretto25-jdk error during installation #575

@khchehab

Description

@khchehab

Bug Report

Package Name: corretto25-jdk

Current Behaviour

When I scoop install java/corretto25-jdk, it fails at the extraction level with an exception.

Expected Behaviour

To install corretto25-jdk successfully without any exception.

Additional context/output

Image

Possible Solution

I compared the different versions of the corretto*-jdk json files, and I found 2 differences with that of 25 in corretto25-jdk.json.

  • The field extract_dir uses a variable $matchBuild which is not used in other versions.
  • The extract_dir field inside the autoupdate field also uses $matchBuild while other versions use $buildVersion.

To test a fix, I updated the json file on my machine, the top-level extract_dir to reference the full version (like in other versions, eg. 21) and updated the field autoupdate.extract_dir to use $buildVersion and I was able to install corretto25-jdk on my machine.

This is the updated json I used which worked, and follow the same pattern as other versions:

{
    "description": "Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK)",
    "homepage": "https://aws.amazon.com/corretto/",
    "version": "25.0.1.8.1",
    "license": "GPL-2.0-only WITH Classpath-exception-2.0",
    "architecture": {
        "64bit": {
            "url": "https://corretto.aws/downloads/resources/25.0.1.8.1/amazon-corretto-25.0.1.8.1-windows-x64-jdk.zip",
            "hash": "f183944b2e0b857f6f8617a272e74aac2f444080df5f159bcc4443c416fa8eb6"
        }
    },
    "extract_dir": "jdk25.0.1_8",
    "env_add_path": "bin",
    "env_set": {
        "JAVA_HOME": "$dir"
    },
    "checkver": {
        "url": "https://github.com/corretto/corretto-downloads/raw/main/latest_links/indexmap_with_checksum.json",
        "jsonpath": "$.windows.x64.jdk.25.zip.resource",
        "regex": "/([\\d.]+)/"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://corretto.aws/downloads/resources/$version/amazon-corretto-$version-windows-x64-jdk.zip",
                "hash": {
                    "url": "https://github.com/corretto/corretto-downloads/raw/main/latest_links/indexmap_with_checksum.json",
                    "jsonpath": "$.windows.x64.jdk.25.zip.checksum_sha256"
                }
            }
        },
        "extract_dir": "jdk$matchHead_$buildVersion"
    }
}

System details

Windows version: 11

OS architecture: 64bit

PowerShell version: 7.5.4

Additional software:

Scoop Configuration

{
  "last_update": "2025-12-13T16:38:50.6659923+02:00",
  "scoop_repo": "https://github.com/ScoopInstaller/Scoop",
  "scoop_branch": "master",
  "debug": false
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions