转自:http://blog.sina.com.cn/s/blog_5736d8870102w15u.html
墙内的论坛上和博客上有很多这样的文章了,不过一般过程都很复杂,让人看的头晕眼花,搬运过来一个比较简单的,更新java的目的单纯动机简单,就是为了用各种外壳程序,kali自带的版本有点低,至少要1.7x才好用,废话不多说了,下载
http://download.oracle.com/otn-pub/java/jdk/7u75-b13/jdk-7u75-linux-x64.tar.gz?AuthParam=1427359148_ae68f5f1ce807daf5db988014b347e97
然后解压
tar zxvf jdk-7u75-linux-x64.tar.gz
第二步,转移:
mv jdk1.7.0_75/ /opt/
cd /opt/jdk1.7.0_75/
第三步,安装
update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_75/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_75/bin/javac 1
update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_75/jre/lib/amd64/libnpjp2.so 1
update-alternatives --set java /opt/jdk1.7.0_75/bin/java
update-alternatives --set javac /opt/jdk1.7.0_75/bin/javac
运行一下看看:
java -version
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
简单易用,分分钟配置好