1
0
mirror of synced 2025-12-30 12:02:01 -05:00
Files
docs/data/reusables/github-actions/java-jvm-architecture.md
2021-04-05 15:15:17 +00:00

21 lines
883 B
Markdown

### Specifying the JVM version and architecture
The starter workflow template 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`.
{% raw %}
```yaml{:copy}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11 for x64
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
architecture: x64
```
{% endraw %}
For more information, see the [`setup-java`](https://github.com/actions/setup-java) action.