Installing Java on Kali-Linux


طاقم الإدارة

Installing Java on Kali-Linux

1. Download the latest Java SE SDK version.

التحميل DOWNLOAD

At the time of writing the filename and version was jdk-8u121-linux-x64.tar.gz

2. Untar the Archive
tar -xzvf /root/jdk-8u121-linux-x64.tar.gz

mv jdk1.8.0_121 /opt
cd /opt/jdk1.8.0_121

This step registers the downloaded version of Java as an alternative, and switches it to be used as the default:
update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_121/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_121/bin/javac 1
update-alternatives --install /usr/lib/mozilla/plugins/ /opt/jdk1.8.0_121/jre/lib/amd64/ 1
update-alternatives --set java /opt/jdk1.8.0_121/bin/java
update-alternatives --set javac /opt/jdk1.8.0_121/bin/javac
update-alternatives --set /opt/jdk1.8.0_121/jre/lib/amd64/

4. Test
To check the version of Java you are now running
java -version
To check the browser plugin browse to and click “Do I have Java?”