Installing Java on Kali-Linux
1. Download the latest Java SE SDK version.
http://www.oracle.com/technetwork/ja...ads/index.html
At the time of writing the filename and version was jdk-7u17-linux-x64.tar.gz
2. Untar the Archive
tar -xzvf /root/jdk-7u17-linux-x64.tar.gz
mv jdk1.7.0_17 /opt
cd /opt/jdk1.7.0_17
3.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.7.0_17/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_17/bin/javac 1
update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_17/jre/lib/amd64/libnpjp2.so 1
update-alternatives --set java /opt/jdk1.7.0_17/bin/java
update-alternatives --set javac /opt/jdk1.7.0_17/bin/javac
update-alternatives --set mozilla-javaplugin.so /opt/jdk1.7.0_17/jre/lib/amd64/libnpjp2.so
4. Test
To check the version of Java you are now running
java -version
To check the browser plugin browse to http://www.java.com/ and click “Do I have Java?”
Latest commands to install as per above with i386
tar -xzvf /root/jdk-7u21-linux-i586.tar.gz
mv jdk1.7.0_21 /opt
cd /opt/jdk1.7.0_21
update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_21/bin/javac 1
update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_21/jre/lib/i386/libnpjp2.so 1
update-alternatives --set java /opt/jdk1.7.0_21/bin/java
update-alternatives --set javac /opt/jdk1.7.0_21/bin/javac
update-alternatives --set mozilla-javaplugin.so /opt/jdk1.7.0_21/jre/lib/i386/libnpjp2.so