I am developing a Java application that needs the latest version of java. Unfortunately, travis-ci currently only supports jdk version 1.8.0_31.
Because of this, I download the newes binary release from oracle and extract it into the $ HOME directory:
before-script:
- "wget --no-cookies --header \"Cookie: oraclelicense=accept-securebackup-cookie\" http://download.oracle.com/otn-pub/java/jdk/8u60-b27/jdk-8u60-linux-x64.tar.gz -O /tmp/OracleJDK.tar.gz"
- tar -xzvf /tmp/OracleJDK.tar.gz -C $HOME
- export PATH=$PATH:$HOME/jdk1.8.0_60/bin
- jdk_switcher use <???>
How to tell travis to use jdk just loaded?
BTW: I am not updating jdk via apt-get because sudo commands are not yet supported with their new docker infrastructure.
source
share