{"id":15045865,"url":"https://github.com/oracle-actions/setup-java","last_synced_at":"2025-08-21T08:31:34.173Z","repository":{"id":38050719,"uuid":"448689020","full_name":"oracle-actions/setup-java","owner":"oracle-actions","description":"GitHub Action to download and install Oracle's Java Development Kit builds","archived":false,"fork":false,"pushed_at":"2024-05-16T22:27:08.000Z","size":253,"stargazers_count":59,"open_issues_count":8,"forks_count":9,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-05-17T06:33:53.282Z","etag":null,"topics":["java","jdk","openjdk","oracle"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"upl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oracle-actions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-16T22:30:22.000Z","updated_at":"2024-05-29T23:25:54.660Z","dependencies_parsed_at":"2023-09-26T05:25:41.587Z","dependency_job_id":"d9135a69-48c0-4be8-adc3-333186ffe39f","html_url":"https://github.com/oracle-actions/setup-java","commit_stats":{"total_commits":177,"total_committers":6,"mean_commits":29.5,"dds":0.4915254237288136,"last_synced_commit":"7773e33ec475cc5804843690739faefd5d6d665f"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-actions%2Fsetup-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-actions%2Fsetup-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-actions%2Fsetup-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-actions%2Fsetup-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oracle-actions","download_url":"https://codeload.github.com/oracle-actions/setup-java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230501172,"owners_count":18236061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","jdk","openjdk","oracle"],"created_at":"2024-09-24T20:52:22.852Z","updated_at":"2025-08-21T08:31:34.161Z","avatar_url":"https://github.com/oracle-actions.png","language":"Java","readme":"# oracle-actions/setup-java\n\nThis action downloads a Java Development Kit (JDK) built by Oracle and installs it using [`actions/setup-java`](https://github.com/actions/setup-java).\n\nJDKs built by Oracle are [Oracle JDK](https://www.oracle.com/java/technologies/downloads/) and [Oracle OpenJDK](https://jdk.java.net).\n\n## Input Overview\n\n| Input Name            | Default Value | Description                                                     |\n|-----------------------|--------------:|-----------------------------------------------------------------|\n| `website`             |  `oracle.com` | From where the JDK should be downloaded.                        |\n| `release`             |          `24` | Java feature release number or name of an Early-Access project. |\n| `version`             |      `latest` | An explicit version of a Java release.                          |\n| `install`             |        `true` | Install the downloaded JDK archive file.                        |\n| `install-as-version`  |       _empty_ | Control the value passed as `java-version`                      |\n| `uri`                 |       _empty_ | Custom URI of a JDK archive file to download.                   |\n\n### Input `website`\n\nThe `website` input specifies from where the JDK should be downloaded.\nIt defaults to `oracle.com`.\n\nThe following values are supported:\n\n- [`oracle.com`](https://www.oracle.com/java/technologies/downloads/) for Oracle JDK 21 and later.\n\n  This action only supports Oracle JDKs provided under the [Oracle No-Fee Terms and Conditions License](https://www.java.com/freeuselicense/).\n\n- [`jdk.java.net`](https://jdk.java.net) for the current OpenJDK General Availability and Early-Access builds.\n\n  Early-Access builds include the [mainline](https://github.com/openjdk/jdk/tags) JDK, Generational ZGC, Project Loom and jextract, Panama, Valhalla, etc.\n\n  The [jdk.java.net-uri.properties](jdk.java.net-uri.properties) file provides a set of key-value pairs mapping OpenJDK descriptions to their download links.\n\n### Input `release`\n\nThe `release` input denotes a Java feature release number (`21`, `22`, ...) or a name of an Early-Access project (`loom`, ...).\nIt defaults to the current General-Availability Release for the Java SE platform., which is `24` as of today.\n\nNote that websites may offer a different set of available releases.\nFor example, `oracle.com` only offers releases of `21` and above; it does not offer Early-Access releases.\n\nNote also that websites may stop offering any release at any time.\nPlease consult the website for details on which release is offered for how long.\n\n### Input `version`\n\nThe `version` input can be used to specify an explicit version of a Java release, such as `21.0.4`.\nIt is set by default to `latest`.\n\n___\n\n\u003e [!CAUTION]\n\u003e Older versions of the JDK are provided to help developers debug issues in older systems.\n\u003e **They are not updated with the latest security patches and are not recommended for use in production.**\n\n___\n\n### Input `install`\n\nThe `install` input enables or disables the automatic JDK installation of the downloaded JDK archive file.\nIt is enabled by default by using `true` as its value.\n\nThis action delegates to [`actions/setup-java`](https://github.com/actions/setup-java) to install the downloaded JDK archive file using default settings.\nPass `false` to skip the automatic JDK installation and invoke `actions/setup-java` with your custom settings.\n\n### Input `install-as-version`\n\nThe `install-as-version` input allows overriding the value passed as `java-version` to the underlying `actions/setup-java` action.\n\nSupported values of `install-as-version` include:\n- `PARSE_URI` parses the computed or given URI for a valid Java version string, ex. `21.0.4`.\n- `HASH_URI` returns the `hashCode()` of the computed or given URI as a string, ex. `12345`.\n- All strings [supported by `actions/setup-java`](https://github.com/actions/setup-java#supported-version-syntax)\n\nThe default value of `install-as-version` depends on the `release` input documented above:\n- If `release` input starts with a digit, `install-as-version` defaults to `PARSE_URI`.\n- If `release` input does not start with a digit, `install-as-version` defaults to `HASH_URI`.\n\n### Input `uri`\n\nUse the `uri` input to download a JDK from the specified URI originating from a supported website.\nThe value of inputs `website`, `release`, and `version` ignored.\n\n## Examples for `oracle.com`\n\nThe following examples use the [JDK Script Friendly URLs](https://www.oracle.com/java/technologies/jdk-script-friendly-urls/) to download and set up binaries that are made available under the [Oracle No-Fee Terms and Conditions License](https://www.java.com/freeuselicense/).\n\n### Download and install the latest version of Oracle JDK\n\n```yaml\nsteps:\n  - name: 'Set up latest Oracle JDK 24'\n    uses: oracle-actions/setup-java@v1\n    with:\n      website: oracle.com\n      release: 24\n```\n\n### Download and install a specific version of Oracle JDK\n\n```yaml\nsteps:\n  - name: 'Set up archived Oracle JDK 21.0.4'\n    uses: oracle-actions/setup-java@v1\n    with:\n      website: oracle.com\n      release: 21\n      version: 21.0.4\n```\n___\n\n\u003e [!CAUTION]\n\u003e Older versions of the JDK are provided to help developers debug issues in older systems.\n\u003e **They are not updated with the latest security patches and are not recommended for use in production.**\n\n___\n\n## Examples for `jdk.java.net`\n\nThe following examples download and install OpenJDK binaries that are made available under the [GNU General Public License, version 2, with the Classpath Exception](https://openjdk.java.net/legal/gplv2+ce.html).\n\n### Download and install an OpenJDK build of a given release\n\n```yaml\nsteps:\n  - name: 'Set up latest JDK N from jdk.java.net'\n    uses: oracle-actions/setup-java@v1\n    with:\n      website: jdk.java.net\n      release: N # Replace N with GA, EA, 21, 22, 23, ...\n```\n\n\u003e [!NOTE]\n\u003e This action supports two `version` symbolic modes for `release: EA` on `jdk.java.net`:\n\u003e   - `version: latest` updates as early as possible to the latest-and-greatest JDK build (default)\n\u003e   - `version: stable` updates later in the release cycle, usually when an early-access JDK build went GA\n\n### Download and install an Early-Access build of a named OpenJDK project\n\n```yaml\nsteps:\n  - name: 'Set up Early-Access build of a named project from jdk.java.net'\n    uses: oracle-actions/setup-java@v1\n    with:\n      website: jdk.java.net\n      release: loom # or panama, valhalla, ...\n```\n\n## Supported GitHub Actions Virtual Environments\n\nAll [environments](https://github.com/actions/virtual-environments#available-environments) with Java 21 pre-installed are supported.\nThese include the following labels: `ubuntu-latest`, `macos-latest`, and `windows-latest`.\n\n## More information\n\nMake sure to check [the announcement and the FAQ](https://inside.java/2022/03/11/setup-java/) on Inside Java.\n\n## Status\n\n[![.github/workflows/test.yml](https://github.com/oracle-actions/setup-java/actions/workflows/test.yml/badge.svg)](https://github.com/oracle-actions/setup-java/actions/workflows/test.yml)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-actions%2Fsetup-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foracle-actions%2Fsetup-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-actions%2Fsetup-java/lists"}