Only download jdk-17.0.0 with oracle distribution and java-version 17?
Description: When using the following config, it seems that the oracle jdk 17.0.0 downloaded and installed.
uses: actions/setup-java@v4
with:
distribution: oracle
java-version: 17
Run actions/setup-java@v4
with:
distribution: oracle
java-version: 17
java-package: jdk
check-latest: false
server-id: github
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
overwrite-settings: true
job-status: success
token: ***
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ***
GITHUB_TOKEN: ***
Installed distributions
Trying to resolve the latest version from remote
Resolved latest version as 17
Trying to download...
Downloading Java 17 (Oracle) from https://download.oracle.com/java/17/archive/jdk-17_linux-x64_bin.tar.gz ...
Extracting Java archive...
/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/d30d12ee-64ed-4b58-b2c1-902c8f040390 -f /home/runner/work/_temp/7c76d087-7c67-4b0a-8701-78984b89e55c
Java 17 was downloaded
Setting Java 17 as the default
Creating toolchains.xml for JDK version 17 from oracle
Platform:
- [x] Ubuntu
- [ ] macOS
- [ ] Windows
Runner type:
- [x] Hosted
- [ ] Self-hosted
Expected behavior: Download the lastest oracle jdk-17, such as 17.0.16.
Hello @HTHou👋, Thank you for reporting this issue. We will investigate it and get back to you as soon as we have some feedback.
I think this issue is similar to https://github.com/actions/setup-java/issues/700.
Oracle changed the license after 17.0.13. https://www.oracle.com/java/technologies/javase/jdk17-0-13-later-archive-downloads.html
Hi @HTHou!
Just a heads up for anyone using the Oracle distribution with actions/setup-java:
-
Oracle JDK 17 releases up to (and including) 17.0.12 are provided under the Oracle No-Fee Terms and Conditions (NFTC) license, which generally permits free commercial and production use.
-
Beginning with 17.0.13 and later, Oracle JDK 17 builds are only available under the Oracle Technology Network (OTN) License for Java SE. This license is more restrictive and typically requires a paid subscription for most commercial or production uses.
Recommendation: Pin to an Oracle JDK 17 version ≤ 17.0.12 for now