Java/JDK on Travis CI



Travis CI should streamline its Java/JDK support on all environments.

  1. Pre-install “all” GA JDK versions from 5-11. Use an external tool to switch between those JDKs, like “sdkman!” or “jabba” or …

  2. Only JDK-ea versions should be installed “on-the-fly” from (via


The Travis CI Build Could not be completed due to an error

I come here from this thread.

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:

      - openjdk-6-jdk
jdk: openjdk6

But the problem is that 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/ --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 for openjdk6.

This is an example:

Notice that for openjdk7, oraclejdk8 and oraclejdk9 the script 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.