Hello Everyone,
This side kidnapshadow(sidharth)
today topic is :--> how to install java 8 (jdk1.8.0) in kali linux
-----------------------------------------------------------------------
01) Download Orale JDK 8
//Link
https://www.oracle.com/
02) Open Your Terminal(Ctrl + alt + T)
03) cd Downloads
04) sudo mkdir /usr/lib/jvm
05) cd /usr/lib/jvm
06) sudo tar -xvzf ~/Downloads/jdk-8u271-linux-x64.tar.gz
07) sudo gedit /etc/environment
(if your computer haven't gedit.. install using this command (sudo apt-get install gedit) )
08) After opened file,add followings command in your variable file
/usr/lib/jvm/jdk1.8.0_271/bin
/usr/lib/jvm/jdk1.8.0_271/db/bin
/usr/lib/jvm/jdk1.8.0_271/jre/bin
J2SDKDIR="/usr/lib/jvm/jdk1.8.0_271"
J2REDIR="/usr/lib/jvm/jdk1.8.0_271/jre"
JAVA_HOME="/usr/lib/jvm/jdk1.8.0_271"
DERBY_HOME="/usr/lib/jvm/jdk1.8.0_271/db"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/jdk1.8.0_271/bin:/usr/lib/jvm/jdk1.8.0_271/db/bin:/usr/lib/jvm/jdk1.8.0_271/jre/bin"
J2SDKDIR="/usr/lib/jvm/jdk1.8.0_271"
J2REDIR="/usr/lib/jvm/jdk1.8.0_271/jre"
JAVA_HOME="/usr/lib/jvm/jdk1.8.0_271"
DERBY_HOME="/usr/lib/jvm/jdk1.8.0_271/db"
09) Save and close the file.
09) Enter Following commands in your Terminal
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_271/bin/java" 0
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_271/bin/javac" 0
sudo update-alternatives --set java /usr/lib/jvm/jdk1.8.0_271/bin/java
sudo update-alternatives --set javac /usr/lib/jvm/jdk1.8.0_271/bin/javac
10) Verify the setup
update-alternatives --list java
update-alternatives --list javac
11)Check the Java Version
java -version
Post a Comment