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

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//')
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
1 Like