Does travis script for installing another jdk still exist?

What I’m trying to add to my Travis script is:

- export JAVA_HOME=$HOME/openjdk11
- $TRAVIS_BUILD_DIR/install-jdk.sh --install openjdk11 --target $JAVA_HOME

as documented at https://docs.travis-ci.com/user/languages/java/#switching-jdks-to-java-10-and-up-within-one-job , but that script doesn’t seem to exist. Should it? How do I swap from my main version of openjdk8 to openjdk11 in the same build?

I’m using github, xenial, and Java and this is to satisfy the need for the sonarcloud plugin to run in context of JDK 11+ (which becomes required in Oct 2020).

Workaround: load the original version of the script from

https://github.com/sormuras/bach/raw/HEAD/install-jdk.sh

to your build directory and invoke it from there.

Note: instead of HEAD you may want to refer to a stable version tag like 11.8

1 Like

Thanks @sormuras (for the script) - I did find that when I was googling and the workaround is actually what I am doing now. I just run this at the end of the “script” phase:

wget https://github.com/sormuras/bach/raw/master/install-jdk.sh && . ./install-jdk.sh -F 11 -L GPL

You’re welcome!

Imprint