# Unable to install JDK 8 on macOS 11.2 with dist: trusty

**URL:** <https://travis-ci.community/t/unable-to-install-jdk-8-on-macos-11-2-with-dist-trusty/6104>\
**Category:** macOS\
**Tags:** trusty, macos\
**Created:** [November 23, 2019, 1:39pm UTC](https://travis-ci.community/t/unable-to-install-jdk-8-on-macos-11-2-with-dist-trusty/6104 "2019-11-23T13:39:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Egorand](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/egorand/32/3711_2.png) [@Egorand](https://travis-ci.community/u/Egorand)\
**Post date:** [November 23, 2019, 1:39pm UTC](https://travis-ci.community/t/unable-to-install-jdk-8-on-macos-11-2-with-dist-trusty/6104/1 "2019-11-23T13:39:23Z")

</div>

I’m trying to update a build that was previously using `osx_image: xcode9.3` but now requires macOS 11. I’ve updated the version to `xcode11.2` and noticed that JDK 8, which my build relies on, is not available anymore from xenial, so I switched to `dist: trusty`. However, the build is still failing with the following error:

```auto
Installing oraclejdk8
$ export JAVA_HOME=~/oraclejdk8
$ export PATH="$JAVA_HOME/bin:$PATH"
$ ~/bin/install-jdk.sh --target "/Users/travis/oraclejdk8" --workspace "/Users/travis/.cache/install-jdk" --feature "8" --license "BCL"
Ignoring license option: BCL -- using GPLv2+CE by default
install-jdk.sh 2019-10-16
Expected feature release number in range of 9 to 14, but got: 8
The command "~/bin/install-jdk.sh --target "/Users/travis/oraclejdk8" --workspace "/Users/travis/.cache/install-jdk" --feature "8" --license "BCL"" failed and exited with 3 during .

```

Build: [https://travis-ci.org/square/okio/builds/615967582](https://travis-ci.org/square/okio/builds/615967582)  
.travis.yml: [https://github.com/square/okio/blob/48906364e673b7f130e2bb0232d8ef1e5b386a3e/.travis.yml](https://github.com/square/okio/blob/48906364e673b7f130e2bb0232d8ef1e5b386a3e/.travis.yml)

Appreciate any help in figuring this out.

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [January 16, 2020, 8:13pm UTC](https://travis-ci.community/t/unable-to-install-jdk-8-on-macos-11-2-with-dist-trusty/6104/2 "2020-01-16T20:13:30Z")

</div>

Hello @Egorand,

Have you tried migrating to OpenJDK?

---

<div class="post-metadata">

**Author:** ![Egorand](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/egorand/32/3711_2.png) [@Egorand](https://travis-ci.community/u/Egorand)\
**Post date:** [January 25, 2020, 3:01pm UTC](https://travis-ci.community/t/unable-to-install-jdk-8-on-macos-11-2-with-dist-trusty/6104/3 "2020-01-25T15:01:00Z")

</div>

@Montana yes, I have, it didn’t work. I managed to work around it by installing the JDK manually using Homebrew. Here’s the resulting .yml: [https://github.com/square/wire/blob/master/.travis.yml](https://github.com/square/wire/blob/master/.travis.yml)

---

<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:** [January 26, 2020, 2:54am UTC](https://travis-ci.community/t/unable-to-install-jdk-8-on-macos-11-2-with-dist-trusty/6104/4 "2020-01-26T02:54:25Z")

</div>

FYI `dist:` has no effect for OSX, it’s only for Linux.
