# Build randomly using jdk 13

**URL:** <https://travis-ci.community/t/build-randomly-using-jdk-13/5636>\
**Category:** macOS\
**Tags:** java\
**Created:** [October 23, 2019, 2:05am UTC](https://travis-ci.community/t/build-randomly-using-jdk-13/5636 "2019-10-23T02:05:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Parth](https://avatars.discourse-cdn.com/v4/letter/p/e56c9b/32.png) [@Parth](https://travis-ci.community/u/Parth)\
**Post date:** [October 23, 2019, 2:05am UTC](https://travis-ci.community/t/build-randomly-using-jdk-13/5636/1 "2019-10-23T02:05:50Z")

</div>

[https://travis-ci.com/lockbook/lockbook-dev-desktop/jobs/248527996#L4726/13](https://travis-ci.com/lockbook/lockbook-dev-desktop/jobs/248527996#L4726/13)

config clearly states java 11, builder uses java 13, causes build failure, see worker information for more details.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [October 23, 2019, 9:00am UTC](https://travis-ci.community/t/build-randomly-using-jdk-13/5636/2 "2019-10-23T09:00:36Z")

</div>

`jdk:` is ignored for OSX. Use `osx_image: xcode10.1` if you need JDK 11.

> **[Travis CI Documentation](https://docs.travis-ci.com/user/reference/osx/#jdk-and-macos)**
>
> The macOS Build Environment

> **[Travis CI Documentation](https://docs.travis-ci.com/user/languages/java/#testing-against-multiple-jdks)**
>
> Building a Java project

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [November 22, 2019, 6:13pm UTC](https://travis-ci.community/t/build-randomly-using-jdk-13/5636/3 "2019-11-22T18:13:19Z")

</div>

A post was split to a new topic: [Build randomly using jdk 13 despite osx\_image: xcode10.1](https://travis-ci.community/t/build-randomly-using-jdk-13-despite-osx-image-xcode10-1/6085)

---

<div class="post-metadata">

**Author:** ![avdv](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/avdv/32/3214_2.png) [@avdv](https://travis-ci.community/u/avdv)\
**Post date:** [April 30, 2020, 6:26am UTC](https://travis-ci.community/t/build-randomly-using-jdk-13/5636/4 "2020-04-30T06:26:51Z")

</div>

> [@native-api](#):
>
> `jdk:` is ignored for OSX. Use `osx_image: xcode10.1` if you need JDK 11.

Really? Why is that not _clearly_ documented somewhere? The first link says that “testing against multiple Java versions is not supported”, but clicking the link it refers to [The macOS Build Environment - Travis CI](https://docs.travis-ci.com/user/reference/osx/#jdk-and-macos) says:

> While Mac jobs **can test against multiple JDK versions using the [`jdk` key](https://docs.travis-ci.com/user/languages/java/#testing-against-multiple-jdks)**, …

What gives? 😕

---

<div class="post-metadata">

**Author:** ![avdv](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/avdv/32/3214_2.png) [@avdv](https://travis-ci.community/u/avdv)\
**Post date:** [April 30, 2020, 6:29am UTC](https://travis-ci.community/t/build-randomly-using-jdk-13/5636/5 "2020-04-30T06:29:29Z")

</div>

> [@native-api](#):
>
> `jdk:` is ignored for OSX. Use `osx_image: xcode10.1` if you need JDK 11.

So, I tried this and your statement seems to be wrong (as of today) because my job was using the specified OpenJDK 11 image instead after setting the `jdk` key.
