Disclaimer: The tutorials in our blog are solely for educational purposes. They do not substitute professional advice or services.

How To Install Java 8 (Openjdk-8-jdk) Manually in Kali Linux 2021.4

How Install Java 8 (Openjdk-8-jdk) in Kali Linux 2021.4 Manually
Please wait 0 seconds...
Scroll Down and click on Go to Link for destination
Congrats! Link is Generated
Java Version 8 in kali linux

Since Java 8 is not installed by default on Kali Linux new versions. This guide will show you how to manually install JDK 8 without any errors. This is essential to run some of the apps, because they typically require Java 8 to work and will not run on Java 11. The JDK also allows you to develop in Java but if you don't care about that, you can install the JRE the same way.

Follow The Below Instructions To Accomplish it :

STEP 1) JDK8 can be downloaded from the Oracle website.


STEP 2) Go To jvm Directory. Use the command: cd /usr/lib/jvm

STEP 3) Unzip the JDK8 File. Use the command: sudo tar -xvzf ~/Downloads/jdk-8u321-linux-x64.tar.gz

STEP 4) Now Edit The Environment Variable. Use the command: sudo nano /etc/environment

STEP 5) Add The Following Variables : 

openjdk-8-jdk installation


:/usr/lib/jvm/jdk1.8.0_321/bin:/usr/lib/jvm/jdk1.8.0_321/db/bin:/usr/lib/jvm/jdk1.8.0_321/jre/bin

J2SDKDIR="/usr/lib/jvm/jdk1.8.0_321"
J2REDIR="/usr/lib/jvm/jdk1.8.0_321/jre"
JAVA_HOME="/usr/lib/jvm/jdk1.8.0_321"
DERBY_HOME="/usr/lib/jvm/jdk1.8.0_321/db"

STEP 6) Update the JDK Files. Use the following commands: 

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_321/bin/java" 0

sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_321/bin/javac" 0

sudo update-alternatives --set java /usr/lib/jvm/jdk1.8.0_321/bin/java

sudo update-alternatives --set javac /usr/lib/jvm/jdk1.8.0_321/bin/javac

STEP 7) Now update the alternatives lists. Use the following commands: 

sudo update-alternatives --list java

sudo update-alternatives --list javac

sudo update-alternatives --config java

Now select the option 2 and press Enter.

Now check the java version by simply just giving the command: java -version

java 8 manuall installation


If you have followed all the above given steps correctly than Java 8(openjdk-8-jdk) has been successfully installed into your system.


So, Thats all for Today! I hope you have successfully installed the java 8 on your system. And if yes, then please share this with your friends & loved ones who are facing problems to install openjdk-8-jdk in their systems. If you have faced any kinds of error during the installation process feel free to leave a comment down below. Have a wonderful day!

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.