kali Linux

How To Install Java 8 In Kali Linux ( Openjdk8 )

How To Install Java 8 In Kali Linux

Install java 8 in kali linux

Java is a programming language used to develope android apps , web apps , desktop apps , games and much more .

About Kali Linux

Kali Linux is a Linux distribution that is specialized for tasks like cybersecurity. It is an open-source product with a lot of customization done for penetration testing, so that it helps many companies to identify their vulnerabilities.

Kali linux is used for penetrations testing , security research , computer forensics , and reverse engineering.

FEATURES :

1. Its Free

2. Open source

3. Thousands of tools

4. Full customization

5. Multi Language Support

Install java 8 in kali linux

Step 1

First we need to download java 8 in kalilinux. We can direct download or you can use command line to download java 8. I have shared 2 version of java 8 you can use any one of them.

Download Java 8u191

wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3a%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk8-downloads-2133151.html; oraclelicense=accept-securebackup-cookie;" "https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz"

Download Java 8u131

wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz

Step 2

Second we need to create some directory to store java 8 files and after that we need to extrat the java file in it using command line. You can also try manual method while using gyi file manager.

  • sudo mkdir /usr/lib/jvm
  • cd ~/usr/lib/jvm
  • sudo tar -xvzf ~/Downloads/jdk-8u191-linux-x64.tar.gz

Let’s setup environment for java

Step 3

Thirdly we are going to edit and add some txt to the file. First install nano in kali linux ( sudo apt install nano) . Now use the nano tool to edit file.

Edit Environment File

  • sudo nano /etc/environment

Add This 3 Lines

  • /usr/lib/jvm/jdk1.8.0_191/bin
  • /usr/lib/jvm/jdk1.8.0_191/db/bin
  • /usr/lib/jvm/jdk1.8.0_191/jre/bin

At The End Of Environment File Paste This

  • J2SDKDIR=”/usr/lib/jvm/jdk1.8.0_191″
  • J2REDIR=”/usr/lib/jvm/jdk1.8.0_191/jre”
  • JAVA_HOME=”/usr/lib/jvm/jdk1.8.0_191″
  • DERBY_HOME=”/usr/lib/jvm/jdk1.8.0_191/db”

Save Using ctrl x y

Step 4

Copy paste all the commands one by one

  • sudo update-alternatives –install “/usr/bin/java” “java” “/usr/lib/jvm/jdk1.8.0_191/bin/java” 0
  • sudo update-alternatives –install “/usr/bin/javac” “javac” “/usr/lib/jvm/jdk1.8.0_191/bin/javac” 0
  • sudo update-alternatives –set java /usr/lib/jvm/jdk1.8.0_191/bin/java
  • sudo update-alternatives –set javac /usr/lib/jvm/jdk1.8.0_191/bin/javac

Step 5

Update the java

  • update-alternatives –list java
  • update-alternatives –list javac
  • java -version

Conclusion

In this post we show how to install java openjdk 8 in kali linux which is required by many tools, like lemon rat and many more, hope you liking my post dont’t forget to subscribe my youtube channel. Create a forum here if you facing errors.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button

Adblock Detected

Blocked because of Ad Blocker. It seems that you are using some ad blocking software which is preventing the page from fully loading. Please Disable Block Third Party Cookies or disable ad blocking software.