Trying to run with Java 8, but always get Java 11

This has been driving me crazy for the last two days, I create an image that explicitly includes Java 8 but I end up always running Java 11.

My .travis.yml is as follows:

sudo: true
language: node_js
node_js: 10
jdk: oraclejdk8
addons:
  firefox: "65.0"
  chrome: stable
script:
  - java -version
  - xvfb-run npm test

The java -version command always displays a Java 11 version. Am I doing something stupid

See https://travis-ci.community/t/install-jdk-sh-failing-for-openjdk9-and-10/

Imprint