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
  firefox: "65.0"
  chrome: stable
  - java -version
  - xvfb-run npm test

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