Oracle hosts a page on how to install Java 1.8 from the binary
I was able to do the following -
Download the x64 tar.gz on the Oracle Downloads page.
Create my directory and move the file there
sudo mkdir /usr/local/java
sudo mv ~/Downloads/jdk-8u45-linux-x64.tar.gz .
And unpack it
sudo tar zxvf jdk-8u45-linux-x64.tar.gz
The binary itself works, because I can call it using the absolute path
> /usr/local/java/jdk1.8.0_45/bin/java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
But I can't call it standalone
> java -version
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.6-jre-headless
* gcj-4.7-jre-headless
* openjdk-7-jre-headless
* openjdk-6-jre-headless
Try: sudo apt-get install <selected package>
Even setting $JAVA_HOME as that directory didn't work. Is there a step I'm missing? Does it need to be added to my $PATH?
Edit: I'm aware I could probably install java with sudo apt-get install. I ran into some trouble there in that I wasn't able to apt-get update because of some 404 errors. I'd rather handle that as a separate question/post.
Thanks!
bindirectory to the end of my$PATH