# Install of Oracle JDK 8 Failing

**URL:** https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038
**Category:** Java
**Created:** [April 16, 2019, 9:05pm UTC](https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038 "2019-04-16T21:05:47Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![stevespringett](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/stevespringett/32/1602_2.png) [@stevespringett](https://travis-ci.community/u/stevespringett)
#### Post date: [April 16, 2019, 9:05pm UTC](https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038/1 "2019-04-16T21:05:47Z")

</div>

As of today, Oracle licensing has changed and the JDK cannot be downloaded from Oracle any longer without logging in.

This happens when oraclejdk8 is specified.

---

<div class="post-metadata">

### Author: ![dominic](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dominic/32/14_2.png) [@dominic](https://travis-ci.community/u/dominic)
#### Post date: [April 17, 2019, 12:46pm UTC](https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038/2 "2019-04-17T12:46:11Z")

</div>

@stevespringett Sorry for this issue, could you provide us a link to a build showing the error you are getting? Thanks!

---

<div class="post-metadata">

### Author: ![stevespringett](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/stevespringett/32/1602_2.png) [@stevespringett](https://travis-ci.community/u/stevespringett)
#### Post date: [April 17, 2019, 2:10pm UTC](https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038/3 "2019-04-17T14:10:59Z")

</div>

Here’s an example build:  
[https://travis-ci.org/DependencyTrack/dependency-track/builds/520954849](https://travis-ci.org/DependencyTrack/dependency-track/builds/520954849)

I’ve since changed the build to use openjdk and its working fine.

---

<div class="post-metadata">

### Author: ![phax](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/phax/32/1710_2.png) [@phax](https://travis-ci.community/u/phax)
#### Post date: [April 29, 2019, 9:09am UTC](https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038/4 "2019-04-29T09:09:44Z")

</div>

Same issue here. I also changed to openjdk8 and it started working again.  
Maybe you can add a note to the documentation about the “oraclejdk8” jdk?

---

<div class="post-metadata">

### Author: ![dominic](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dominic/32/14_2.png) [@dominic](https://travis-ci.community/u/dominic)
#### Post date: [April 29, 2019, 3:53pm UTC](https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038/5 "2019-04-29T15:53:59Z")

</div>

Hey @phax, sorry for the troubles.

Unfortunately, something seems to have changed on Oracle’s servers that was making JDK runtime installation to fail. See the following for more details: [https://github.com/sormuras/bach/issues/51](https://github.com/sormuras/bach/issues/51).

Following on from that, I just did some tests before writing you back and it seems that the issue got fixed as I’m now able to install this JDK again (i.e. `oraclejdk8`). Hence, could you try to restart your previously failing build and let me know if it’s fixed on your side as well?

Thanks!

---

<div class="post-metadata">

### Author: ![phax](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/phax/32/1710_2.png) [@phax](https://travis-ci.community/u/phax)
#### Post date: [April 30, 2019, 8:15am UTC](https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038/6 "2019-04-30T08:15:56Z")

</div>

@dominic Thanks for your response. I extended my scripts and added oraclejdk8 in parallel to openjdk8 but it fails: [https://travis-ci.org/phax/ph-pdf-layout/jobs/526322862](https://travis-ci.org/phax/ph-pdf-layout/jobs/526322862) - hth

Edit: but openjdk11 on trusty works again 😃

---

<div class="post-metadata">

### Author: ![phax](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/phax/32/1710_2.png) [@phax](https://travis-ci.community/u/phax)
#### Post date: [April 30, 2019, 8:26am UTC](https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038/7 "2019-04-30T08:26:51Z")

</div>

Further update: oraclejdk8 on trusty seems to work fine: [https://travis-ci.org/phax/ParserGeneratorCC](https://travis-ci.org/phax/ParserGeneratorCC) - there is a problem in xenial only

---

<div class="post-metadata">

### Author: ![krmahadevan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/krmahadevan/32/2390_2.png) [@krmahadevan](https://travis-ci.community/u/krmahadevan)
#### Post date: [August 1, 2019, 3:08am UTC](https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038/8 "2019-08-01T03:08:45Z")

</div>

@dominic - I am having the same problem with building TestNG code. I am seeing this error from the last two days.

Here’s the error information

```
Installing oraclejdk8

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

```

From the error it looks to me that jdk8 is no longer available and we need to choose at least 9.

Build link : [https://travis-ci.org/cbeust/testng/jobs/566166250](https://travis-ci.org/cbeust/testng/jobs/566166250)

Corresponding travis.yml file : [https://github.com/cbeust/testng/blob/master/.travis.yml](https://github.com/cbeust/testng/blob/master/.travis.yml)

---

<div class="post-metadata">

### Author: ![dominic](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dominic/32/14_2.png) [@dominic](https://travis-ci.community/u/dominic)
#### Post date: [August 1, 2019, 12:04pm UTC](https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038/9 "2019-08-01T12:04:04Z")

</div>

@krmahadevan Your builds got migrated to our Xenial image because you don’t specify a `dist:` in your .travis.yml file. Please add `dist: trusty` to move them back on Trusty where this should work.

See

> **[Xenial as the default build environment - Travis CI changelog](https://changelog.travis-ci.com/xenial-as-the-default-build-environment-99476)**
>
> As announced two weeks ago, we've started incrementally updating the default build environment to Ubuntu Xenial...

  

> **[The Travis CI Blog: Ubuntu Xenial 16.04 as the default Travis CI build...](https://blog.travis-ci.com/2019-04-15-xenial-default-build-environment)**
>
> Xenial as the default Travis CI build environment is coming up next week, starting incrementally on Tuesday April 23rd, 2019.
> 
> Since Ubuntu 14.04 reaches End of Life on April 30th, 2019, we’ll be g...

for details.

---

<div class="post-metadata">

### Author: ![dominic](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dominic/32/14_2.png) [@dominic](https://travis-ci.community/u/dominic)
#### Post date: [August 1, 2019, 12:04pm UTC](https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038/10 "2019-08-01T12:04:51Z")

</div>

We are closing this topic for now. Please open a new one if you ran into something similar. Thank you!

---

<div class="post-metadata">

### Author: ![dominic](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dominic/32/14_2.png) [@dominic](https://travis-ci.community/u/dominic)
#### Post date: [August 1, 2019, 12:04pm UTC](https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038/11 "2019-08-01T12:04:55Z")

</div>


