参考网址:http://www.blackmoreops.com/2013/10/26/how-to-install-java-jdk-in-kali-linux/
1.下载javase,http://www.oracle.com/technetwork/java/javase/downloads/index.html
2.解压:tar zxvf jdk-8u77-linux-x64.tar.gz
3.拷贝目录:mv jdk1.8.0_77/ /opt
4:执行以下命令
update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_77/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_77/bin/javac 1
update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.8.0_77/jre/lib/amd64/libnpjp2.so 1
update-alternatives --set java /opt/jdk1.8.0_77/bin/java
update-alternatives --set javac /opt/jdk1.8.0_77/bin/javac
update-alternatives --set mozilla-javaplugin.so /opt/jdk1.8.0_77/jre/lib/amd64/libnpjp2.so
5.执行以上操作时,请关闭浏览器
验证是否安装成功:
1.java -version
2.http://www.java.com/en/download/installed.jsp