I’m trying to use openjdk6 in trusty environment exactly as the documentation tell me to do. By installing openjdk-6-jdk package using apt addon. For example:
But the problem is that install-jdk.sh script is executed with an invalid parameter --feature "6". This script terminate the build execution with the following error message:
Expected feature release number in range of 9 to 13, but got: 6
The command "~/bin/install-jdk.sh --target "/home/travis/openjdk6" --workspace "/home/travis/.cache/install-jdk" --feature "6" --license "GPL" --cacerts" failed and exited with 3 during .
I was expecting Travis CI to not execute install-jdk.sh for openjdk6.
Notice that for openjdk7, oraclejdk8 and oraclejdk9 the script install-jdk.sh is not executed at all. But the jdk_switcher is executed instead. After Installing JDK phase, Installing APT Packages phase is executed installing OpenJDK 6.
Again, for openjdk6 I was expecting Installing APT Packages phase to run before Installing JDK phase and this later phase to only execute jdk_switcher use openjdk6.
I would like to upgrade from Trusty to use Xenial or Bionic since Trusty is EOL. However, only Trusty supports JDK 7 and JDK 8.
We should be able to get OpenJDK8 working on Xenial or Bionic by adding the packages:
addons:
apt:
packages:
- openjdk-8-jdk
Alas, when this is done, Travis does not understand that OpenJDK8 is available, and instead calls install-jdk.sh which fails because it isn’t designed to install JDKs older than 9. (See Why no more support for JDK 8.)
Can’t Travis be fixed to support OpenJDK8? (My users are demanding Java 7 and Java 8 support still. I’m open to stopping Java 7 since it is EOL, but Java 8 should still be supported.)
Xenial works for JDK 8, but I can’t get JDK 7 working unless I use Trusty.
Also, Bionic won’t allow JDK 8 – it appears to have an artificial limit a version between 9 and 14.
In the meantime, I compromised by dropping JDK 7 support for my project and moved to Xenial for JDK 8+ support.