I needed JDK 8 for Bazel. I ran sudo apt-get install openjdk-8*
on a freshly built Ubuntu 16.04.02 machine, but after installation update-alternatives --config java
show two paths:
/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
/usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java
I purged opensdk-8*
and then installed apt-get openjdk-9*
but the outcome was the same.
How do I get JDK 8?
E: Unable to locate package openjdk-8-jdk
. – Old Geezer Jul 03 '17 at 16:12sudo apt update
first. You need to be connected to the internet. – Pilot6 Jul 03 '17 at 16:24