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


According to “Pre-installed JVMs: openjdk10 , and openjdk11 .” should be available

But the logs show “11.0.1 (Oracle Corporation 11.0.1+13)”:

Is this intended?

How do I select one of the pre-installed Java versions AND prevent the “” to kick in?


Seems like dropping the “jdk” element from the .travis.yaml file leads to an OpenJDK 11 installation.


Hm, the build log shows more oddities:

With having only language: java (no jdk) configured:

A simple “java -version” reports: openjdk version "11.0.1" 2018-10-16

A subsequent call of Maven reports: Java version: 11.0.1, vendor: Oracle Corporation


Also, when I pass jdk: openjdk8, the default JDK remains openjdk11. The openjdk-8-jdk package does get installed, but it is overridden in $PATH by /usr/local/lib/jvm/openjdk11/bin, and $JAVA_HOME remains set to /usr/local/lib/jvm/openjdk11.

For now I’m working around this by fixing the environment variables:

PATH=$(echo "$PATH" | sed -e 's/:\/usr\/local\/lib\/jvm\/openjdk11\/bin//')


Same issue here. if I set openjdk8 the build still executes on java11

 - openjdk8

Executes as
Java version: 11.0.1, vendor: Oracle Corporation, runtime: /usr/local/lib/jvm/openjdk11