mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 01:46:46 +00:00
Update README
This commit is contained in:
parent
71e29f6b75
commit
e26d1cc9f9
1 changed files with 6 additions and 5 deletions
11
README.md
11
README.md
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
This action sets up a java environment for use in actions by:
|
This action sets up a java environment for use in actions by:
|
||||||
|
|
||||||
- optionally downloading and caching a version of java by version and adding to PATH. Downloads from [Azul's Zulu distribution](http://static.azul.com/zulu/bin/).
|
- optionally downloading and caching a requested version of java by version and adding to PATH. Default downloads are populated from the [Zulu Community distribution of OpenJDK](http://static.azul.com/zulu/bin/)
|
||||||
- registering problem matchers for error output
|
- registering problem matchers for error output
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
@ -19,7 +19,8 @@ steps:
|
||||||
- uses: actions/checkout@latest
|
- uses: actions/checkout@latest
|
||||||
- uses: actions/setup-java@v1
|
- uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: '9.0.4' // The JDK version to make available on the path. Takes a whole or semver Jdk version, or 1.x syntax (e.g. 1.8 => Jdk 8.x)
|
java-version: '11.0.4' // The Java version to make available on the path. Takes a whole or semver Java version, or 1.x syntax (e.g. 1.8 => Jdk 8.x)
|
||||||
|
java-package: jdk // (jre, jdk, or jdk-fx) - defaults to jdk
|
||||||
architecture: x64 // (x64 or x86) - defaults to x64
|
architecture: x64 // (x64 or x86) - defaults to x64
|
||||||
- run: java -cp java HelloWorldApp
|
- run: java -cp java HelloWorldApp
|
||||||
```
|
```
|
||||||
|
@ -32,7 +33,7 @@ steps:
|
||||||
with:
|
with:
|
||||||
java-version: '4.0.0'
|
java-version: '4.0.0'
|
||||||
architecture: x64
|
architecture: x64
|
||||||
jdkFile: <path to jdkFile> # Optional - jdkFile to install java from. Useful for versions not supported by Azul
|
jdkFile: <path to jdkFile> # Optional - jdkFile to install java from. Useful for versions not found on Zulu Community CDN
|
||||||
- run: java -cp java HelloWorldApp
|
- run: java -cp java HelloWorldApp
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -43,7 +44,8 @@ jobs:
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ubuntu-16.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java: [ '1.6', '9.0.x', '12.0.2' ]
|
# test against latest update of each major Java version, as well as specific updates of LTS versions:
|
||||||
|
java: [ 1.6, 6.0.83, 7, 7.0.181, 8, 8.0.192, 9.0,x, 10, 11.0.x, 11.0.3, 12, 13]
|
||||||
name: Java ${{ matrix.java }} sample
|
name: Java ${{ matrix.java }} sample
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
|
@ -51,7 +53,6 @@ jobs:
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: ${{ matrix.java }}
|
java-version: ${{ matrix.java }}
|
||||||
architecture: x64
|
|
||||||
- run: java -cp java HelloWorldApp
|
- run: java -cp java HelloWorldApp
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue