You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Setup AdoptOpenJDK
v1.0.0
This action sets up a Java development environment with the OpenJDK distribution from AdoptOpenJDK for use in actions by:
- Downloading and caching a version of the OpenJDK by version and adding to
PATH
. Downloads from AdoptOpenJDK. - Registering problem matchers for error output.
The action is based on actions/setup-java and is using the AdoptOpenJDK API for fetching the JDK binaries.
See action.yml
Basic:
steps:
- uses: actions/checkout@latest
- uses: joschi/setup-jdk@v1
with:
java-version: 'openjdk11' // The OpenJDK version to make available on the path
architecture: 'x64' // defaults to 'x64'
- run: java -cp java HelloWorldApp
Matrix Testing:
jobs:
build:
runs-on: ubuntu-16.04
strategy:
matrix:
java: [ 'openjdk8', 'openjdk11', 'openjdk13' ]
name: Java ${{ matrix.java }} sample
steps:
- uses: actions/checkout@master
- name: Setup java
uses: joschi/setup-jdk@v1
with:
java-version: ${{ matrix.java }}
architecture: x64
- run: java -cp java HelloWorldApp
The scripts and documentation in this project are released under the MIT License.
Contributions are welcome! See Contributor's Guide