Debian installing Oracle Java


These notes are quite old. Yeah. Use common sense when following 🙂

I’m on my Debian testing, installing java as per didn’t work for me for some reasons.

Edit 2016-06-22: it works these days 🙂 I’ve used new instructions here


Web apps I’m forced to use require Sun (well Oracle) version which is no longer supplied by Debian. Bugger.

Most confusing bit (it took me a while to figure out why its’t working…) you need to link to java/lib/i386/ rather than to java/plugin/i386/ns7/ – note, it was for 386, amd64 arch is different I think.

Below notes are for my reference only, no warranty given or implied!

Lets start with random picture from my library, visualisation of my soul after using badly written java program, eeek


Go to and grab a newest version marked as “Linux (self-extracting file)”, at the time of writing it is jre-8u31-linux-x64.tar.gz

tar -xzf jre-8u31-linux-x64.tar.gz -C /usr/local/
ln -s /usr/local/jre1.8.0_31 /usr/local/java

cd /etc/alternatives/ && for i in; do rm $i; ln -s /usr/local/java/lib/amd64/ $i;done

vi /etc/profile.d/


After next login you should be getting:

java -version

java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

Additionally, for system wide access to new java

and Java plugin should be available in Iceweasel

update-alternatives --install /usr/bin/java java /usr/local/java/bin/java 1
update-alternatives --config java
update-alternatives --install /usr/bin/javaws javaws /usr/local/java/bin/javaws 1
update-alternatives --config javaws

Also, Chrome and Iceweasel plugin

update-alternatives --install /usr/local/lib/ /usr/local/java/lib/amd64/ 4
update-alternatives --config


mkdir /opt/google/chrome/plugins
ln -s /usr/local/java/lib/amd64/ /opt/google/chrome/plugins/

Iceweasel and Firefox

ln -s /usr/local/java/lib/amd64/ /usr/lib/mozilla/plugins/



 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



This site uses Akismet to reduce spam. Learn how your comment data is processed.