How to install Java in Kali Linux 2.x / Kali Linux 1.x (Two Methods)


This is a small guide with instructions that users can copy paste and make Java work in their Kali Linux. So lets get on with this guide….

Download the latest Java SE SDK version

Go to the following link and download jdk7. At the time of writing this guide the jdk version was jdk-7u51-linux-x64. Note that I’m using x32 which is 32-bit. 64-bit users should choose their versions accordingly. Not that tough really!
Following is what I’ve used. 
Again, at the time of writing this guide the available version was jdk-7u51-linux-x64.tar.gz
Download and save the file in /root directory.


UnTar the Archive and move to /opt






Install and register binaries

This step registers the downloaded version of Java as an alternative, and switches it to be used as the default:

For Kali Linux 32bit

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 x64

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

Test

First of all, close your browser and re-open. You won’t believe how many users actually forgets to do this step and later complains Java ain’t working. I’d advise to bookmark this site to be able to reopen these instructions quickly, or simply copy these into a leafpad/vi/text file.
To check the version of Java you are now running
java -version
To check the browser plugin just click Do I have Java?
This should take you to Oracles Java website and you will see a confirmation message.
After Java the next step is obviously installing Flash. No one want’s to miss Youtube cat videos! Well, maybe not everyone. Here’s the guide to enable Flash in Kali Linux How to Install Flash in Kali Linux.
Thanks for reading.

BMD

Tutorials, Networking, Security, Virtualisation, Microsoft, Linux, Android, iOS and Apple, Tech Reviews, Free Ebooks and More!.

sharethis

 

Copyright @ 2024 iExplo1t | Developed by AuresExpress.com