Proprietary JDK on Debian
In case you must use the proprietary Oracle JDK:
- grab the JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html
sudo apt-get install java-package
make-jpkg downloadedpackage.tar.gz
- may need to install some additional dependencies before this succeeds
- install the package. e.g:
sudo dpkg -i oracle-java8-jdk_8u92_amd64.deb
- run
update-alternatives --config java
If using just tarball:
sudo update-alternatives --install /usr/bin/java java /opt/java/bin/java 1081
sudo update-alternatives --config java