Mostly doing this article as a note for the correct way to install java jdk or runtime for kali or debian wheezy.
Download either the jdk or jre tar.gz package from oracle
Install the java-package from debian
[codesyntax lang=”bash”]
apt-get install java-package
[/codesyntax]
Use the make-jpkg command as a normal user to create a debian package from the downloaded archive
[codesyntax lang=”bash”]
fakeroot make-jpkg /path/to/downloaded/jdk-7u21-linux-x64.tar.gz
[/codesyntax]
Once it completes you should see:
[codesyntax lang=”bash”]
The Debian package has been created in the current directory. You can install the package as root (e.g. dpkg -i oracle-j2sdk1.7_1.7.0+update21_amd64.deb).
[/codesyntax]
Install the package:
[codesyntax lang=”bash”]
sudo dpkg -i oracle-j2sdk1.7_1.7.0+update21_amd64.deb
[/codesyntax]
Locate the libnpjp2.so file so you can enable support for java in iceweasel:
[codesyntax lang=”bash”]
$ dpkg -L oracle-j2sdk1.7 | grep libnpjp2.so /usr/lib/jvm/j2sdk1.7-oracle/jre/lib/amd64/libnpjp2.so
[/codesyntax]
Create the symlink to the file:
[codesyntax lang=”bash”]
cd /etc/alternatives sudo ln -s /usr/lib/jvm/j2sdk1.7-oracle/jre/lib/amd64/libnpjp2.so mozilla-javaplugin.so cd /usr/lib/mozilla/plugins sudo ln -s /etc/alternatives/mozilla-javaplugin.so mozilla-javaplugin.so
[/codesyntax]
Once this is done, close your browser then open it up and visit the java test page (you will need to allow the plugin to run).
Leave a Reply
You must be logged in to post a comment.