环境:kali-linux-2016.1-i386
软件版本:jdk-8u91-linux-i586
下载
http://www.oracle.com/technetwork/java/javase/downloads/index.html
解压包拷贝
tar -xzvf jdk-8u91-linux-i586.gz
mv jdk1.8.0_91/ /usr/bin
安装注册
update-alternatives --install /usr/bin/java java /usr/bin/jdk1.8.0_91/bin/java 1
update-alternatives --install /usr/bin/javac javac /usr/bin/jdk1.8.0_91/bin/javac 1
update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /usr/bin/jdk1.8.0_91/jre/lib/i386/libnpjp2.so 1
默认设置
update-alternatives --set java /usr/bin/jdk1.8.0_91/bin/java
update-alternatives --set javac /usr/bin/jdk1.8.0_91/bin/javac
update-alternatives --set mozilla-javaplugin.so /usr/bin/jdk1.8.0_91/jre/lib/i386/libnpjp2.so
验证
http://www.java.com/en/download/installed.jsp