kali linux安装java

首先在官网下载java压缩包:http://www.oracle.com/technetwork/java/javase/downloads/index.html

这里选择tar.gz的linux系统的jdk

移动到opt目录下并解压:

mv jdk-10.0.1_linux-x64_bin.tar.gz /opt
cd /opt
tar -zxvf jdk-10.0.1_linux-x64_bin.tar.gz
cp -r jdk-10.0.1/ /usr/bin    #复制到bin目录

安装注册:

update-alternatives --install usr/bin/java java /opt/jdk-10.0.1bin/java 1       #安装java
update-alternatives --install usr/bin/javac javac /opt/jdk-10.0.1bin/javac 1    #安装javac
update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk-10.0.1/lib/libnpjp2.so 1 #候选路径原本为/opt/jdk-10.0.1/jre/lib/amd64/libnpjp2.so,然而我并没有jre那个目录

安装完成后还要进行配置

默认设置:

update-alternatives --set java /opt/jdk-10.0.1/bin/java
update-alternatives --set javac /opt/jdk-10.0.1/bin/javac
update-alternatives --set mozilla-javaplugin.so /opt/jdk-10.0.1/lib/libnpjp2.so 

验证:


验证java浏览器插件:

http://www.java.com/en/download/installed.jsp

你可能感兴趣的:(kali,study)