Oracle JDK 11 (and 10) are pre-installed, not the OpenJDK builds

Thanks, adding dist: trusty also fixed my case for openjdk7 which wasn’t available with the default xenial where I was getting this error message:

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

Worked for me. Thanks!