On linux there are a few different favors of Java. there are atleast two that we are aware of. One from Oracle and a second from opensource community which is called OpenJDK. For some reason, we like to do this old fashion way. Therefore, we will install JDK from oracle.
As of this writing, there is this release of JDK 1.8.91 and 1.8.92.
- download the latest JDk from oracle:
- JDK 1.8.92/91
- download either the *.*.91 or *.*.92 edition
- save it somewhere on your machine
- its weird how we do this but other software are doing this as well so we are following them.
- sudo cp jdk-8u92-linux-x64.tar.gz /opt
- cd /opt
- sudo tar xzvf jdk-8u92-linux-x64.tar.gz
- sudo chown -R root:root jdk1.8.0_92/
- you can make it own by your username which is fine too, root should be ok, otherwise,
- sudo chown -R yourusername:yourusername jdk1.8.0_92/
- cd /usr/bin
- sudo ln -s /opt/jdk1.8.0_92/bin/java java
- sudo ln -s /opt/jdk1.8.0_92/bin/javac javac
- DONE !