1
0
mirror of synced 2025-12-26 14:02:45 -05:00
Files
docs/data/reusables/actions/java-jvm-architecture.md
Lucas Costi b49c768777 Version actions for GHES, use reusables (#26004)
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Sarah Edwards <skedwards88@github.com>
2022-04-01 09:36:17 +10:00

901 B

Specifying the JVM version and architecture

The starter workflow sets up the PATH to contain OpenJDK 8 for the x64 platform. If you want to use a different version of Java, or target a different architecture (x64 or x86), you can use the setup-java action to choose a different Java runtime environment.

For example, to use version 11 of the JDK provided by Adoptium for the x64 platform, you can use the setup-java action and configure the java-version, distribution and architecture parameters to '11', 'adopt' and x64.

steps:
  - uses: {% data reusables.actions.action-checkout %}
  - name: Set up JDK 11 for x64
    uses: {% data reusables.actions.action-setup-java %}
    with:
      java-version: '11'
      distribution: 'adopt'
      architecture: x64

For more information, see the setup-java action.