Scroll Down To View Your Content 🢃
Wait 7 seconds for video
Please wait 0 seconds...
Scroll Down and click on Go To Link for destination
Congrats! Link is Generated!

How To Install OpenJdk-8 Manually On Your Linux Machine?

As Java 8 is not installed by default on newer Kali Linux versions, this guide will show you how to manually install JDK 8 without any errors...

Follow The Below Steps:
Step 1: Download JDK8 from Oracle:
Step 2: cd /usr/lib/jvm
Step 3: sudo tar -xvzf ~/Downloads/jdk-8u321-linux-x64.tar.gz
Step 4: sudo nano /etc/environment
Step 5: Add the following lines:
:/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 Java alternatives:
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: Test installation:
java -version

If you followed all steps, Java 8 (openjdk-8-jdk) is now successfully installed!

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.
Site is Blocked
Sorry! This site is not available in your country.