# Install of zulu openjdk11 is failing in travis

**URL:** <https://travis-ci.community/t/install-of-zulu-openjdk11-is-failing-in-travis/4135>\
**Category:** Java\
**Tags:** github-integration\
**Created:** [July 9, 2019, 7:29am UTC](https://travis-ci.community/t/install-of-zulu-openjdk11-is-failing-in-travis/4135 "2019-07-09T07:29:13Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsabhi](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/rsabhi/32/2253_2.png) [@rsabhi](https://travis-ci.community/u/rsabhi)\
**Post date:** [July 9, 2019, 7:29am UTC](https://travis-ci.community/t/install-of-zulu-openjdk11-is-failing-in-travis/4135/1 "2019-07-09T07:29:13Z")

</div>

Hi,  
I am trying to use the following script in travis.yml file, but travis still take jdk1.8

> Blockquote  
> language: java  
> sudo: false  
> dist: xenial  
> jdk: zulu11.31.11-ca-fx-jdk11.0.3-linux\_x64

before\_script:

- unset -v \_JAVA\_OPTIONS
- wget [https://github.com/sormuras/bach/raw/master/install-jdk.sh](https://github.com/sormuras/bach/raw/master/install-jdk.sh)  
jobs:  
include:
  - stage: Downloading Azul zulu jdk11 and jfx download  
env: JDK=zulu11.31.11-ca-fx-jdk11.0.3-linux\_x64  
script: source install-jdk.sh --url [https://cdn.azul.com/zulu/bin/zulu11.31.11-ca-fx-jdk11.0.3-linux\_x64.tar.gz](https://cdn.azul.com/zulu/bin/zulu11.31.11-ca-fx-jdk11.0.3-linux_x64.tar.gz)

after\_script:  
- echo JAVA\_HOME = ${JAVA\_HOME}  
- echo PATH = ${PATH}  
- ls ${JAVA\_HOME}  
- java -version

> Blockquote

please suggest me how to use it in Travis.  
Thanks you in advance.  
-Ab

---

<div class="post-metadata">

**Author:** ![sormuras](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/sormuras/32/2770_2.png) [@sormuras](https://travis-ci.community/u/sormuras)\
**Post date:** [July 9, 2019, 7:40am UTC](https://travis-ci.community/t/install-of-zulu-openjdk11-is-failing-in-travis/4135/2 "2019-07-09T07:40:04Z")

</div>

Using `https://cdn.azul.com/zulu/bin/zulu12.2.3-ca-jdk12.0.1-linux_x64.tar.gz` works like a charm:

> **[Travis CI - Test and Deploy with Confidence](https://app.travis-ci.com/sormuras/sormuras.github.io/jobs/555982983)**
>
> Travis CI enables your team to test and ship your apps with confidence. Easily sync your projects with Travis CI and you'll be testing your code in minutes.

Ignore the Java version printed out **before** you tell `install-jdk.sh` to install Zulu 11. That’s the defaut Java version provided by Travis CI’s image.

> $ java -Xmx32m -version  
> java version “1.8.0\_151”  
> Java™ SE Runtime Environment (build 1.8.0\_151-b12)  
> Java HotSpot™ 64-Bit Server VM (build 25.151-b12, mixed mode)

Look at the **tail** of the log, and expand the folded `java -version` entries.

---

<div class="post-metadata">

**Author:** ![jayvdb](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jayvdb/32/1966_2.png) [@jayvdb](https://travis-ci.community/u/jayvdb)\
**Post date:** [July 9, 2019, 12:15pm UTC](https://travis-ci.community/t/install-of-zulu-openjdk11-is-failing-in-travis/4135/3 "2019-07-09T12:15:28Z")

</div>

See [Install-jdk.sh failing for openjdk9 and 10](https://travis-ci.community/t/install-jdk-sh-failing-for-openjdk9-and-10/3998/) for context

---

<div class="post-metadata">

**Author:** ![rsabhi](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/rsabhi/32/2253_2.png) [@rsabhi](https://travis-ci.community/u/rsabhi)\
**Post date:** [July 9, 2019, 12:16pm UTC](https://travis-ci.community/t/install-of-zulu-openjdk11-is-failing-in-travis/4135/4 "2019-07-09T12:16:53Z")

</div>

Thank you very much for the reply. Even after downloading zulujdk11, travis still referring to jdk8 ☹

====== travis build result ===  
build-init:  
[mkdir] Created dir: /workdir/build/public-package-jars  
Scanning for modules in /usr/local/netbeans-8.2/harness  
Scanning for modules in /usr/local/netbeans-8.2/platform  
Scanning for modules in suite /workdir

BUILD FAILED  
/usr/local/netbeans-8.2/harness/suite.xml:187: The following error occurred while executing this line:  
/usr/local/netbeans-8.2/harness/common.xml:225: Compile failed; see the compiler error output for details.

---

<div class="post-metadata">

**Author:** ![sormuras](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/sormuras/32/2770_2.png) [@sormuras](https://travis-ci.community/u/sormuras)\
**Post date:** [July 9, 2019, 4:32pm UTC](https://travis-ci.community/t/install-of-zulu-openjdk11-is-failing-in-travis/4135/5 "2019-07-09T16:32:58Z")

</div>

Your snippets shows “netbeans-8.2”… this has nothing to do with the underlying JDK version.

Can you please share a link to your repository and/or build log?

---

<div class="post-metadata">

**Author:** ![rsabhi](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/rsabhi/32/2253_2.png) [@rsabhi](https://travis-ci.community/u/rsabhi)\
**Post date:** [July 10, 2019, 2:39am UTC](https://travis-ci.community/t/install-of-zulu-openjdk11-is-failing-in-travis/4135/6 "2019-07-10T02:39:20Z")

</div>

Hi sormuras,  
Thank you for the reply. Please find the sample of yml file I use. Kindly suggest.

> Blockquotejobs:  
> include:

- stage: Run Tests  
language: java  
before\_script:
  - unset -v \_JAVA\_OPTIONS
  - wget [https://github.com/sormuras/bach/raw/master/install-jdk.sh](https://github.com/sormuras/bach/raw/master/install-jdk.sh)  
env: JDK=zulu11.31.11-ca-fx-jdk11.0.3-linux\_x64  
script: source install-jdk.sh --url [https://cdn.azul.com/zulu/bin/zulu11.31.11-ca-fx-jdk11.0.3-linux\_x64.tar.gz](https://cdn.azul.com/zulu/bin/zulu11.31.11-ca-fx-jdk11.0.3-linux_x64.tar.gz)  
sudo: false  
dist: trusty  
script:
  - docker pull “$IMAGE\_NAME” || true
  - docker run -v $(pwd):/workdir/ --workdir /workdir/ abc/netbeans-builder .travis/script.sh  
services:
  - docker  
env: IMAGE\_NAME=abc/netbeans-builder  
after\_script:
  - echo JAVA\_HOME = ${JAVA\_HOME}
  - echo PATH = ${PATH}
  - ls ${JAVA\_HOME}
  - java -version

- stage: Build zip  
language: java  
before\_script:
  - unset -v \_JAVA\_OPTIONS
  - wget [https://github.com/sormuras/bach/raw/master/install-jdk.sh](https://github.com/sormuras/bach/raw/master/install-jdk.sh)  
env: JDK=zulu11.31.11-ca-fx-jdk11.0.3-linux\_x64  
script: source install-jdk.sh --url [https://cdn.azul.com/zulu/bin/zulu11.31.11-ca-fx-jdk11.0.3-linux\_x64.tar.gz](https://cdn.azul.com/zulu/bin/zulu11.31.11-ca-fx-jdk11.0.3-linux_x64.tar.gz)  
sudo: false  
dist: trusty  
script:
  - docker pull “$IMAGE\_NAME” || true
  - docker run -v $(pwd):/workdir/ --workdir /workdir/ abc/netbeans-builder .travis/build-zip.sh  
dist: trusty  
sudo: required  
services:
  - docker  
env: IMAGE\_NAME=abc/netbeans-builder  
language: generic  
after\_script:
  - echo JAVA\_HOME = ${JAVA\_HOME}
  - echo PATH = ${PATH}
  - ls ${JAVA\_HOME}
  - java -version  
deploy:  
provider: releases  
api\_key:  
secure: jdjdjjdjdjdjdjdjjjdjdj  
file: ‘dist/abc.zip’  
on:  
repo: abc/def  
branch: master  
tags: true

---

<div class="post-metadata">

**Author:** ![sormuras](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/sormuras/32/2770_2.png) [@sormuras](https://travis-ci.community/u/sormuras)\
**Post date:** [July 10, 2019, 6:47am UTC](https://travis-ci.community/t/install-of-zulu-openjdk11-is-failing-in-travis/4135/7 "2019-07-10T06:47:48Z")

</div>

Looks like there’s an issue with how you setup your staged Travis CI script. Try to make it work without stages first.

---

<div class="post-metadata">

**Author:** ![DanySK](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/danysk/32/1399_2.png) [@DanySK](https://travis-ci.community/u/DanySK)\
**Post date:** [July 10, 2019, 9:11am UTC](https://travis-ci.community/t/install-of-zulu-openjdk11-is-failing-in-travis/4135/8 "2019-07-10T09:11:45Z")

</div>

@rsabhi if the zulu JVM you need is available on Jabba you may consider using [Gravis-CI](https://github.com/DanySK/Gravis-CI)

---

<div class="post-metadata">

**Author:** ![rsabhi](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/rsabhi/32/2253_2.png) [@rsabhi](https://travis-ci.community/u/rsabhi)\
**Post date:** [July 10, 2019, 3:10pm UTC](https://travis-ci.community/t/install-of-zulu-openjdk11-is-failing-in-travis/4135/9 "2019-07-10T15:10:33Z")

</div>

# Thanks

language: java  
sudo: false  
dist: trusty

before\_script:

- unset -v \_JAVA\_OPTIONS
- wget [https://github.com/sormuras/bach/raw/master/install-jdk.sh](https://github.com/sormuras/bach/raw/master/install-jdk.sh)

jobs:  
include:

- stage: zulu open jdk downloading  
env: JDK=zulu8.38.0.13-ca-fx-jdk8.0.212  
script: source install-jdk.sh --url [https://cdn.azul.com/zulu/bin/zulu8.38.0.13-ca-fx-jdk8.0.212-linux\_x64.tar.gz](https://cdn.azul.com/zulu/bin/zulu8.38.0.13-ca-fx-jdk8.0.212-linux_x64.tar.gz)

=====

I am getting error  
Installing zulu8.38.0.13-ca-fx-jdk8.0.212

$ export JAVA\_HOME=~/zulu8.38.0.13-ca-fx-jdk8.0.212

$ export PATH="$JAVA\_HOME/bin:$PATH"

$ ~/bin/install-jdk.sh --target “/home/travis/zulu8.38.0.13-ca-fx-jdk8.0.212” --workspace “/home/travis/.cache/install-jdk” --feature “” --license “”

Ignoring license option: – using GPLv2+CE by default

install-jdk.sh 2019-07-06

Expected feature release number in range of 9 to 14, but got:

The command “~/bin/install-jdk.sh --target “/home/travis/zulu8.38.0.13-ca-fx-jdk8.0.212” --workspace “/home/travis/.cache/install-jdk” --feature “” --license “”” failed and exited with 3 during .

Your build has been stopped.

---

<div class="post-metadata">

**Author:** ![rsabhi](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/rsabhi/32/2253_2.png) [@rsabhi](https://travis-ci.community/u/rsabhi)\
**Post date:** [July 15, 2019, 4:11am UTC](https://travis-ci.community/t/install-of-zulu-openjdk11-is-failing-in-travis/4135/10 "2019-07-15T04:11:34Z")

</div>

Hi sormuras,  
Could you please suggest the error I have pointed out? Does it still works for zulu8.38.0.13-ca-fx-jdk8.0.212? I am getting error, Installing zulu8.38.0.13-ca-fx-jdk8.0.212

$ export JAVA\_HOME=~/zulu8.38.0.13-ca-fx-jdk8.0.212

$ export PATH="$JAVA\_HOME/bin:$PATH"

$ ~/bin/install-jdk.sh --target “/home/travis/zulu8.38.0.13-ca-fx-jdk8.0.212” --workspace “/home/travis/.cache/install-jdk” --feature “” --license “”

---

<div class="post-metadata">

**Author:** ![sormuras](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/sormuras/32/2770_2.png) [@sormuras](https://travis-ci.community/u/sormuras)\
**Post date:** [July 15, 2019, 4:53am UTC](https://travis-ci.community/t/install-of-zulu-openjdk11-is-failing-in-travis/4135/11 "2019-07-15T04:53:45Z")

</div>

Looks like no valid feature (and license) argument is passed: `--feature “” --license “”`

It seems there’s a mix of different `install-jdk.sh` scripts active. Strange…

Please compare your `.travis.yml` configuration with this one: [https://travis-ci.org/sormuras/sormuras.github.io/jobs/555982983/config](https://travis-ci.org/sormuras/sormuras.github.io/jobs/555982983/config)
