Skip to content

88: Java 23 / JDK 23: General Availability #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ This project uses tags and branches for [release management](https://docs.github


## [Unreleased]
_nothing noteworthy yet_

## [1.4.0] - 2024-03-21
### Added
- Java `24` and project `leyden` to the list of Early-Access releases
- New `version: stable` mode for `release: ea` setups
- Retry of failed JDK archive downloads
### Changed
- Default value of `release` input to Java `23`

## [1.3.4] - 2024-03-21
### Fixed
Expand Down Expand Up @@ -66,7 +71,8 @@ This project uses tags and branches for [release management](https://docs.github
### Added
- Initial Release

[Unreleased]: https://github.com/oracle-actions/setup-java/compare/v1.3.4...HEAD
[Unreleased]: https://github.com/oracle-actions/setup-java/compare/v1.4.0...HEAD
[1.4.0]: https://github.com/oracle-actions/setup-java/compare/v1.3.4...v1.4.0
[1.3.4]: https://github.com/oracle-actions/setup-java/compare/v1.3.3...v1.3.4
[1.3.3]: https://github.com/oracle-actions/setup-java/compare/v1.3.2...v1.3.3
[1.3.2]: https://github.com/oracle-actions/setup-java/compare/v1.3.1...v1.3.2
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ JDKs built by Oracle are [Oracle JDK](https://www.oracle.com/java/technologies/d
| Input Name | Default Value | Description |
|-----------------------|--------------:|-----------------------------------------------------------------|
| `website` | `oracle.com` | From where the JDK should be downloaded from. |
| `release` | `22` | Java feature release number or name of an Early-Access project. |
| `release` | `23` | Java feature release number or name of an Early-Access project. |
| `version` | `latest` | An explicit version of a Java release. |
| `install` | `true` | Install the downloaded JDK archive file. |
| `install-as-version` | _empty_ | Control the value passed as `java-version` |
Expand All @@ -22,7 +22,7 @@ It defaults to `oracle.com`.

Following values are supported:

- [`oracle.com`](https://www.oracle.com/java/technologies/downloads/) for Oracle JDK 17 and later.
- [`oracle.com`](https://www.oracle.com/java/technologies/downloads/) for Oracle JDK 21 and later.

This action only supports Oracle JDKs provided under the [Oracle No-Fee Terms and Conditions License](https://www.java.com/freeuselicense/).

Expand All @@ -34,18 +34,18 @@ Following values are supported:

### Input `release`

The `release` input denotes a Java feature release number (`17`, `18`, ...) or a name of an Early-Access project (`loom`, ...).
It defaults to the current General-Availability Release for the Java SE platform., which is `22` as of today.
The `release` input denotes a Java feature release number (`21`, `22`, ...) or a name of an Early-Access project (`loom`, ...).
It defaults to the current General-Availability Release for the Java SE platform., which is `23` as of today.

Note that websites may offer a different set of available releases.
For example, `oracle.com` only offers releases of `17` and above; it does not offer any Early-Access releases.
For example, `oracle.com` only offers releases of `21` and above; it does not offer any Early-Access releases.

Note also that websites may stop offering any release at any time.
Please consult the website for details which release is offered for how long.

### Input `version`

The `version` input can be used to specify an explicit version of a Java release, ex. `17.0.1`.
The `version` input can be used to specify an explicit version of a Java release, ex. `21.0.4`.
It is set by default to `latest`.

___
Expand All @@ -69,7 +69,7 @@ Pass `false` to skip the automatic JDK installation and invoke `actions/setup-ja
The `install-as-version` input allows overriding the value passed as `java-version` to the underlying `actions/setup-java` action.

Supported values of `install-as-version` include:
- `PARSE_URI` parses the computed or given URI for a valid Java version string, ex. `17.0.1`.
- `PARSE_URI` parses the computed or given URI for a valid Java version string, ex. `21.0.4`.
- `HASH_URI` returns the `hashCode()` of the computed or given URI as a string, ex. `12345`.
- All strings [supported by `actions/setup-java`](https://github.com/actions/setup-java#supported-version-syntax)

Expand All @@ -90,23 +90,23 @@ The following examples use the [JDK Script Friendly URLs](https://www.oracle.com

```yaml
steps:
- name: 'Set up latest Oracle JDK 22'
- name: 'Set up latest Oracle JDK 23'
uses: oracle-actions/setup-java@v1
with:
website: oracle.com
release: 22
release: 23
```

### Download and install a specific version of Oracle JDK

```yaml
steps:
- name: 'Set up archived Oracle JDK 17.0.10'
- name: 'Set up archived Oracle JDK 21.0.4'
uses: oracle-actions/setup-java@v1
with:
website: oracle.com
release: 17
version: 17.0.10
release: 21
version: 21.0.4
```
___

Expand All @@ -128,7 +128,7 @@ steps:
uses: oracle-actions/setup-java@v1
with:
website: jdk.java.net
release: N # Replace N with GA, EA, 17, 18, 19, ...
release: N # Replace N with GA, EA, 21, 22, 23, ...
```

> [!NOTE]
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ inputs:
required: true
default: 'oracle.com'
release:
description: 'Feature release number or project name, defaults to `22`'
description: 'Feature release number or project name, defaults to `23`'
required: true
default: '22'
default: '23'
version:
description: 'Additional version information, defaults to `latest`'
required: true
Expand Down
6 changes: 3 additions & 3 deletions src/ListOpenJavaDevelopmentKits.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@
class ListOpenJavaDevelopmentKits {

/** Current General-Availability release number. */
static final String GA = System.getProperty("GA", "22");
static final String GA = System.getProperty("GA", "23");

/** Current Soon-Archived release number. */
static final String SA = System.getProperty("SA");

/** Early-Access Releases, as comma separated names. */
static final String EA = System.getProperty("EA", "24,23,jextract,leyden,loom,valhalla");
static final String EA = System.getProperty("EA", "24,jextract,leyden,loom,valhalla");

/** Current "latest" Early-Access Release number. */
static final String EA_LATEST = System.getProperty("EA_LATEST", "24");

/** Current "stable" Early-Access Release number. */
static final String EA_STABLE = System.getProperty("EA_STABLE", "23");
static final String EA_STABLE = System.getProperty("EA_STABLE", "24");

/** Include archived releases flag. */
static final boolean ARCHIVES = Boolean.getBoolean("ARCHIVES");
Expand Down
7 changes: 4 additions & 3 deletions test/Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ static void checkAllOracleJDKs() {

System.out.println();
System.out.println("// oracle.com - archive");
Stream.of("22").forEach(version -> checkOracleJDK("22", version));
Stream.of("21", "21.0.1", "21.0.2").forEach(version -> checkOracleJDK("21", version));
Stream.of("23").forEach(version -> checkOracleJDK("23", version));
Stream.of("22", "22.0.1", "22.0.2").forEach(version -> checkOracleJDK("22", version));
Stream.of("21", "21.0.1", "21.0.2", "21.0.4").forEach(version -> checkOracleJDK("21", version));
Stream.of("20", "20.0.1", "20.0.2").forEach(version -> checkOracleJDK("20", version));
Stream.of("19", "19.0.1", "19.0.2").forEach(version -> checkOracleJDK("19", version));
Stream.of("18", "18.0.1", "18.0.1.1").forEach(version -> checkOracleJDK("18", version));
Stream.of("17", "17.0.1", "17.0.2").forEach(version -> checkOracleJDK("17", version));
Stream.of("17", "17.0.1", "17.0.2", "17.0.12").forEach(version -> checkOracleJDK("17", version));
}

static void checkAllJavaNetJDKs() {
Expand Down