Also, when I passjdk: openjdk8, the default JDK remainsopenjdk11. 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//')
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
Hey @umayrh, we did some changes around JDK installation in the first half of December. To have a better understanding of your situation, could you post a link to a recent build still exhibiting the behavior described in the beginning? Thanks!
@dominic any progress on this issue? One of my builds is failing due to being run with Java 11 when I specified openjdk8, but curiously enough only when reaching the script stage - checking the java version in the install stage correctly reports Java 8, but when in the script stage it reports Java 11.
I had a look at your build and what happens is that you specify language: generic and, because of this, the jdk: key won’t be taken into account. Sorry for the inconvenience.
For jdk: to be read, you’ll need to specify language: java.
My hunch is that this was working with dist: trusty because the pre-installed JDKs (and possibly other dependencies) met your requirements.
? In our project we had to switch to xenial because of some Python dependencies but then Oracle JDK 8 installed fails with the above mentioned error. Had switched to OpenJDK 8 however I am baffled as to what is the technical difficulty of making oraclejdk8 work on xenial.
I am having similar issue , while using Language as Java . here is my .travis.yml config language: java jdk: oraclejdk8
but I am still getting the following error Expected feature release number in range of 9 to 14, but got: 8 The command "~/bin/install-jdk.sh --target "/home/travis/oraclejdk8" --workspace "/home/travis/.cache/install-jdk" --feature "8" --license "BCL"" failed and exited with 3 during .