Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ Currently, the following distributions are supported:

**NOTE:** To comply with the GraalVM Free Terms and Conditions (GFTC) license, it is recommended to use GraalVM JDK 17 version 17.0.12, as this is the only version of GraalVM JDK 17 available under the GFTC license. Additionally, it is encouraged to consider upgrading to GraalVM JDK 21, which offers the latest features and improvements.

**NOTE:** Oracle JDK 17 versions up to 17.0.12 are provided under the NFTC license (free for commercial use). Versions 17.0.13 and later are under the OTN license (restricted). If you need Oracle JDK 17 under the NFTC license, use `distribution: 'oracle'` and explicitly pin `java-version: '17.0.12'` (or an earlier 17.0.x version) rather than the floating `java-version: '17'`. Alternatively, upgrade to Oracle JDK 21 or later, which remains available under the NFTC license.
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This note makes specific licensing assertions (NFTC up to 17.0.12, OTN from 17.0.13+, and that JDK 21+ is NFTC) but doesn’t cite the applicable Oracle license terms. To avoid accidentally misleading users if Oracle’s licensing changes again (or if the cutover version differs), consider linking to the NFTC and OTN license pages and phrasing the guidance more defensively (e.g., “verify the license for the exact patch version”). Also, since setup-java’s Oracle installer tries /java/<major>/latest/... and falls back to /java/<major>/archive/jdk-<range>... when /latest is missing, it may be worth explicitly mentioning that java-version: '17' can fall back to downloading jdk-17 (GA) rather than the latest patch, so users should pin to the exact patch they need.

Suggested change
**NOTE:** Oracle JDK 17 versions up to 17.0.12 are provided under the NFTC license (free for commercial use). Versions 17.0.13 and later are under the OTN license (restricted). If you need Oracle JDK 17 under the NFTC license, use `distribution: 'oracle'` and explicitly pin `java-version: '17.0.12'` (or an earlier 17.0.x version) rather than the floating `java-version: '17'`. Alternatively, upgrade to Oracle JDK 21 or later, which remains available under the NFTC license.
**NOTE:** Oracle Java licensing can change between releases, so verify the license for the exact JDK version you intend to use against Oracle's official terms: [NFTC](https://www.oracle.com/downloads/licenses/no-fee-license.html) and [OTN](https://www.oracle.com/downloads/licenses/oracle-jdk-license.html). If you specifically need Oracle JDK 17.0.12, pin `distribution: 'oracle'` and `java-version: '17.0.12'` instead of the floating `java-version: '17'`. A floating major version can resolve via fallback behavior to `jdk-17` (GA) rather than the latest 17.x patch, so pin the exact patch version you require. If you are considering newer Oracle JDK releases such as 21+, check the license for that exact release before use.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new Oracle JDK licensing note conflicts a bit with the distribution table’s oracle “License” link (currently a single link to java.com/freeuselicense). If Oracle JDK 17 spans multiple licenses by patch level, consider updating the oracle row to reflect that (e.g., link to a general Oracle Java licensing page or include both NFTC/OTN references) so readers don’t assume one license applies to all Oracle JDK downloads.

Suggested change
**NOTE:** Oracle JDK 17 versions up to 17.0.12 are provided under the NFTC license (free for commercial use). Versions 17.0.13 and later are under the OTN license (restricted). If you need Oracle JDK 17 under the NFTC license, use `distribution: 'oracle'` and explicitly pin `java-version: '17.0.12'` (or an earlier 17.0.x version) rather than the floating `java-version: '17'`. Alternatively, upgrade to Oracle JDK 21 or later, which remains available under the NFTC license.
**NOTE:** Oracle JDK 17 licensing varies by patch level. Versions up to 17.0.12 are provided under the [Oracle No-Fee Terms and Conditions (NFTC)](https://www.oracle.com/downloads/licenses/no-fee-license.html) license (free for commercial use), while versions 17.0.13 and later are under the [Oracle Technology Network License Agreement (OTN)](https://www.oracle.com/downloads/licenses/javase-license1.html) (restricted). If you need Oracle JDK 17 under the NFTC license, use `distribution: 'oracle'` and explicitly pin `java-version: '17.0.12'` (or an earlier 17.0.x version) rather than the floating `java-version: '17'`. Alternatively, upgrade to Oracle JDK 21 or later, which remains available under the NFTC license.

Copilot uses AI. Check for mistakes.

### Caching packages dependencies
The action has a built-in functionality for caching and restoring dependencies. It uses [toolkit/cache](https://github.com/actions/toolkit/tree/main/packages/cache) under hood for caching dependencies but requires less configuration settings. Supported package managers are gradle, maven and sbt. The format of the used cache key is `setup-java-${{ platform }}-${{ packageManager }}-${{ fileHash }}`, where the hash is based on the following files:

Expand Down
Loading