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
Copy file name to clipboardExpand all lines: user/languages/java.md
+3-45Lines changed: 3 additions & 45 deletions
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ new to Travis CI please read our [Tutorial](/user/tutorial/) and
31
31
32
32
## Overview
33
33
34
-
The Travis CI environment contains various versions of OpenJDK, Oracle JDK,
34
+
The Travis CI environment contains various versions of OpenJDK,
35
35
Gradle, Maven and Ant.
36
36
37
37
To use the Java environment, add the following to your `.travis.yml`:
@@ -176,19 +176,6 @@ addons:
176
176
```
177
177
{: data-file=".travis.yml"}
178
178
179
-
## Testing Against Multiple JDKs
180
-
181
-
To test against multiple JDKs, use the `jdk:` key in `.travis.yml`. For example,
182
-
to test against Oracle JDKs 8 and 9, as well as OpenJDK 8:
183
-
184
-
```yaml
185
-
jdk:
186
-
- oraclejdk8
187
-
- oraclejdk9
188
-
- openjdk8
189
-
```
190
-
{: data-file=".travis.yml"}
191
-
192
179
> Note that testing against multiple Java versions is not supported on macOS. See
193
180
the [macOS Build Environment](/user/reference/osx/#jdk-and-macos) for more
194
181
details.
@@ -208,48 +195,19 @@ If your build needs to switch JDKs (Java 8 and below) during a job, you can do s
208
195
209
196
```yaml
210
197
script:
211
-
- jdk_switcher use oraclejdk8
212
-
- # do stuff with Java 8
213
198
- jdk_switcher use openjdk8
214
199
- # do stuff with open Java 8
215
200
```
216
201
{: data-file=".travis.yml"}
217
202
218
203
Use of `jdk_switcher` also updates `$JAVA_HOME` appropriately.
219
204
220
-
### Updating Oracle JDK 8 to a recent release
221
-
222
-
Your repository may require a newer release of Oracle JDK than the pre-installed
223
-
version.
224
-
(You can consult [the list of published Oracle JDK packages](https://launchpad.net/~webupd8team/+archive/ubuntu/java).)
225
-
226
-
The following example will use the latest Oracle JDK 8:
227
-
228
-
```yaml
229
-
addons:
230
-
apt:
231
-
packages:
232
-
- oracle-java8-installer
233
-
```
234
-
{: data-file=".travis.yml"}
235
-
236
205
## Using Java 10 and later
237
206
238
207
> Take note that `oraclejdk10` is EOL since October 2018 and as such it's not supported anymore on Travis CI.
239
208
> See [https://www.oracle.com/technetwork/java/javase/eol-135779.html](https://www.oracle.com/technetwork/java/javase/eol-135779.html){: data-proofer-ignore=""}.
240
-
241
-
OracleJDK 11 and later are supported on Linux, and
242
-
OpenJDK 10 and later are supported on Linux and macOS using
> `openjdk` is now the default jdk available on our VMs as `install-jdk` no longer installs `oraclejdk`. Please see this [Github Issue](https://github.com/sormuras/bach/issues/56) for context.
253
211
254
212
### Switching JDKs (to Java 10 and up) Within One Job
0 commit comments