You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update examples and references to Java where older Java versions are used to
highlight the support of Java 21.
Specific provider examples are only updated where they support Java 21.
Fixes#557
Copy file name to clipboardexpand all lines: docs/advanced-usage.md
+15-10
Original file line number
Diff line number
Diff line change
@@ -25,13 +25,14 @@ See [action.yml](../action.yml) for more details on task inputs.
25
25
Inputs `java-version` and `distribution` are mandatory and needs to be provided. See [Supported distributions](../README.md#Supported-distributions) for a list of available options.
26
26
27
27
### Eclipse Temurin
28
+
28
29
```yaml
29
30
steps:
30
31
- uses: actions/checkout@v4
31
32
- uses: actions/setup-java@v4
32
33
with:
33
34
distribution: 'temurin'
34
-
java-version: '11'
35
+
java-version: '21'
35
36
- run: java -cp java HelloWorldApp
36
37
```
37
38
@@ -49,37 +50,40 @@ steps:
49
50
```
50
51
51
52
### Zulu
53
+
52
54
```yaml
53
55
steps:
54
56
- uses: actions/checkout@v4
55
57
- uses: actions/setup-java@v4
56
58
with:
57
59
distribution: 'zulu'
58
-
java-version: '11'
60
+
java-version: '21'
59
61
java-package: jdk # optional (jdk, jre, jdk+fx or jre+fx) - defaults to jdk
60
62
- run: java -cp java HelloWorldApp
61
63
```
62
64
63
65
### Liberica
66
+
64
67
```yaml
65
68
steps:
66
69
- uses: actions/checkout@v4
67
70
- uses: actions/setup-java@v4
68
71
with:
69
72
distribution: 'liberica'
70
-
java-version: '11'
73
+
java-version: '21'
71
74
java-package: jdk # optional (jdk, jre, jdk+fx or jre+fx) - defaults to jdk
72
75
- run: java -cp java HelloWorldApp
73
76
```
74
77
75
78
### Microsoft
79
+
76
80
```yaml
77
81
steps:
78
82
- uses: actions/checkout@v4
79
83
- uses: actions/setup-java@v4
80
84
with:
81
85
distribution: 'microsoft'
82
-
java-version: '11'
86
+
java-version: '21'
83
87
- run: java -cp java HelloWorldApp
84
88
```
85
89
@@ -94,7 +98,7 @@ uses: actions/setup-java@v4
94
98
with:
95
99
token: ${{ secrets.GH_DOTCOM_TOKEN }}
96
100
distribution: 'microsoft'
97
-
java-version: '11'
101
+
java-version: '21'
98
102
```
99
103
100
104
If the runner is not able to access github.com, any Java versions requested during a workflow run must come from the runner's tool cache. See "[Setting up the tool cache on self-hosted runners without internet access](https://docs.github.com/en/enterprise-server@3.2/admin/github-actions/managing-access-to-actions-from-githubcom/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access)" for more information.
@@ -108,7 +112,7 @@ steps:
108
112
- uses: actions/setup-java@v4
109
113
with:
110
114
distribution: 'corretto'
111
-
java-version: '11'
115
+
java-version: '21'
112
116
- run: java -cp java HelloWorldApp
113
117
```
114
118
@@ -121,12 +125,13 @@ steps:
121
125
- uses: actions/setup-java@v4
122
126
with:
123
127
distribution: 'oracle'
124
-
java-version: '17'
128
+
java-version: '21'
125
129
- run: java -cp java HelloWorldApp
126
130
```
127
131
128
132
### Alibaba Dragonwell
129
133
**NOTE:** Alibaba Dragonwell only provides jdk.
134
+
130
135
```yaml
131
136
steps:
132
137
- uses: actions/checkout@v4
@@ -188,7 +193,7 @@ If your use-case requires a custom distribution (in the example, alpine-linux is
188
193
- name: fetch latest temurin JDK
189
194
id: fetch_latest_jdk
190
195
run: |
191
-
major_version={{ env.JAVA_VERSION }} # Example 8 or 11 or 17
196
+
major_version={{ env.JAVA_VERSION }} # Example 16 or 21 or 22
0 commit comments