I'm trying to install java 10 on the 64 bit OS. I can install java 11 fine with
sudo apt-get install openjdk-11-jdk-headless, but when I do
sudo apt-get install openjdk-10-jdk-headless, I get the error
Package openjdk-10-jdk-headless is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
I found a similar issue on the github page Java OpenJDK 8 LTS not available for download. It was closed with the message
For anyone else having issues like this, I ended up downloading the Oracle JDK tarball off the developer portal. It contains a precompiled JRE that I copied to the user folder.
I have been able to download the .tar.gz file for jdk 10 from the java archive and extract it, but running
java -version results in an error saying
java: command not found
This was my process for installing java 10, but any version between (inclusive) 8-10 would work, if that makes this any easier. I'm not sure what to do next. Thanks for your help.