How can the answer be improved? 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.
And follow the instructions. Before we begin installing Java Some things you’ll need before we start installing Java: • An Ubuntu server. You can get one from or any other • A sudo/root user.