HOW TO INSTALL JAVA IN KALI LINUX 2.0 SANA
hello everyone !
Today im gonna show you how to install java on an android phone that has installed kali linux 2.0 sana.
NOTE: you need java for most of your ethical hackings from android using kali linux like for signing your apks,etc...
first step: identify your architecture is 64bit or 32bit
Goto kali linux in ur android phone and open up the terminal and type 'uname -a' or 'uname -r'(without quotes) to know your architecture.
second step: Download java from oracle
since on android goto the link below and download java for armv7.In my case i use 32bit and if u use 64bit kali linux download for it.
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Third step: Use esfile explorer to move the downloaded tar file to the desktop our kali linux system. The path is
data/local/linux/home/android/Desktop
Fourth step:Goto to your linux system and install
open up ur terminal and type
sudo su
you will get the root permission and since its I've moved to the desktop make ur path to it for that type
cd Desktop
and list the files in the desktop to that type
ls
and copy the name of the tar java file and then type
tar -zxvf jdk-8u65-linux-arm32-vfp-hflt.tar.gz(paste the name of the tar file u copied)
and then again type ls to list out the files on desktop and you will find a new java folder just copy the name of that folder since we have to move it to opt folder for that type
mv /opt/ jdk1.8.0_65(paste the folder name.u copied)
then type
cd /opt/jdk1.8.0_65
Fifth step: Install and register binaries
so in this step registers the downloaded version of Java as an alternative, and switches it to be used as the default so for it use the following command in the terminal.
For kali linux 32 bit
update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_51/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_51/bin/javac 1
update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_51/jre/lib/i386/libnpjp2.so 1
update-alternatives --set java /opt/jdk1.7.0_51/bin/java
update-alternatives --set javac /opt/jdk1.7.0_51/bin/javac
update-alternatives --set mozilla-javaplugin.so /opt/jdk1.7.0_51/jre/lib/i386/libnpjp2.so
For kali linux 64bit
update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_51/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_51/bin/javac 1
update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_51/jre/lib/amd64/libnpjp2.so 1
update-alternatives --set java /opt/jdk1.7.0_51/bin/java
update-alternatives --set javac /opt/jdk1.7.0_51/bin/javac
update-alternatives --set mozilla-javaplugin.so /opt/jdk1.7.0_51/jre/lib/amd64/libnpjp2.so
Note: change jdk1.7.0_51 to the name of your respective folder name
sixth step : Test your java
First close all your browser and goto the terminal and type
java -version