Repository navigation
Add support for downloading and running JDK builds #612
Description
Activity
- addedfeature requestNew feature or request to improve the current logicNew feature or request to improve the current logic
on Mar 26, 2024 v-HarithaVattikuti commented
on Mar 27, 2024 ContributorMore actionsHello @BlueGoliath
Thank you for creating this feature request. We will investigate it and get back to you as soon as we have some feedback.@HarithaVattikuti any update on this issue? It would potentially address other needs as well.
This use case is already supported today via the
jdkfiledistribution, without needing a dedicated URL input.You can download the JDK in a prior step and point
setup-javaat the archive with thejdkFileinput —setup-javathen handles extraction, installation, caching, andJAVA_HOMEsetup:steps: - run: | download_url="https://github.com/adoptium/temurin22-binaries/releases/download/jdk-22%2B36/OpenJDK22U-jdk_x64_linux_hotspot_22_36.tar.gz" wget -O $RUNNER_TEMP/java_package.tar.gz $download_url - uses: actions/setup-java@v5 with: distribution: 'jdkfile' jdkFile: ${{ runner.temp }}/java_package.tar.gz java-version: '22' architecture: x64 - run: java --version
This is exactly the scenario you described — using unreleased / Early Access Java versions not yet provided by
setup-java. The only difference from the original request is that the download happens in a workflow step (a singlewget/curlline) rather thansetup-javafetching the URL itself, which also gives you full control over architecture selection.This is documented in Installing Java from local file, which also shows a variant that auto-fetches the latest JDK at runtime.
Given the need is fully met by the existing
jdkfilefeature, I'm closing this issue. I'll also add a note to the advanced docs calling out the Early Access use case explicitly. If you'd prefer a nativejdkUrlinput wheresetup-javadoes the download itself, feel free to open a separate feature request for that specific enhancement.- addeddocumentationImprovements or additions to documentationImprovements or additions to documentation
on Jun 23, 2026 - added a commit that references this issue
on Jun 23, 2026
Description:
Add an option to set a URL for a JDK build which setup-java will use to download, uncompress, and run per arch.
Justification:
I often use unreleased Java versions not supported by this plugin(e.g. Java 22) and would like to use it.