Introducing the `oracle-actions/setup-java` GitHub action

A GitHub Action to download and install Oracle's Java Development Kit builds

Oracle is always looking to make the JDK easier to use. The recent No Fee Terms and Conditions license and the JDK 17 script-friendly URLs are examples of this effort. Today, we are introducing an additional way to consume the various JDK builds produced by Oracle with the release of the oracle-actions/setup-java GitHub action.

This action can be used to download and install many of the JDK builds from Oracle for use in your pipelines. These include:

  • Oracle OpenJDK builds released under GPL v2 with Classpath exception
    • General Availability (GA) builds
    • Early-Access (EA) builds of mainline JDK
    • Early-Access builds of projects including Loom and Panama
  • Oracle JDK builds released under the NTFC license, for which commercial support is available through the Java SE Subscription offering

For more information and how to use this action, please check out the actions page in the GitHub Marketplace.

 


Frequently Asked Questions

 

Why not use GitHub’s own actions/setup-java instead?

We prefer Java-based actions over TypeScript ones! More seriously, the oracle-actions/setup-java action actually does use GitHub’s actions/setup-java action to install the JDK. We needed more control over the initial download phase, specifically:

  • Inputs supported by actions/setup-java are a compromise on a minimal common denominator to support multiple vendors. It would have been tricky to properly provide early access builds of projects like Loom.

  • We wanted to help the various open-source projects involved in the OpenJDK Quality Outreach program by offering them an easy way to use early-access builds. Given that those EA builds are produced for the purpose of gathering feedback on ongoing JDK development, we needed to have more control over the information the action is logging, for example, a visible warning message when an EA build is used.

Are you planning to add support for other OpenJDK builds?

No, oracle-actions/setup-java is solely focused on Oracle-produced builds. If it’s not what you’re looking for, you should look at actions/setup-java instead.



PS: This initial release comes with the usual caveats (best-effort support, etc.) but feedback is welcome!

For more information, visit the action page in the GitHub marketplace.