2010
05.06

By default Ubuntu (10.04) doesn’t contain a 64 bit version of Sun’s (Official) Java plugin. Of course you can use the icedtea* plugin, but I noticed that not all Java applets (i.e. Webmin file manager) are working in it. That’s why I was eager to get the Official one working. This is how you do it:

Download the latest JRE (to ~/Downloads/mozilla):

wget 'http://javadl.sun.com/webapps/download/AutoDL?BundleId=...' -O jre-6u20-linux-x64.bin

Create the folder in which we’re going to install Java:

sudo mkdir -p /opt/java/64
cd /opt/java/64

Copy the installer to that folder, set it to be executable and install:

sudo cp ~/Downloads/mozilla/jre-6u20-linux-x64.bin .
sudo chmod 755 jre-6u20-linux-x64.bin
sudo ./jre-6u20-linux-x64.bin

Set it to be the default JRE:

sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/64/jre1.6.0_20/bin/java" 1
sudo update-alternatives --set java /opt/java/64/jre1.6.0_20/bin/java
java -version

It should say:

java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

Remove the “old” JRE:

sudo apt-get remove --purge icedtea*

Link the browser plugin to your Firefox profile:

mkdir -p ~/.mozilla/plugins
rm ~/.mozilla/plugins/libnpjp2.so
ln -s /opt/java/64/jre1.6.0_20/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

Firefox about:plugins should mention something like Java(TM) Plug-in 1.6.0_20 File: libnpjp2.so

7 comments so far

Add Your Comment
  1. Mischa ter Smitten

    Doesn’t work! 🙁

  2. Mischa ter Smitten

    What exactly doesn’t work?

  3. Mischa ter Smitten

    Works perfectly, thanks!
    Except (and that is maybe meant by Nerijus) the wget path is not valid. Instead you can google for the jre install file name.

  4. Mischa ter Smitten

    The wget path is wrong because of wordpress; I think. I will try to fix it.

  5. Mischa ter Smitten

    Wasn’t because of wordpress. They just changed their directory structure.

  6. Mischa ter Smitten

    it worked just fine..

  7. Mischa ter Smitten

    Nicely written!