Installing Sun Java JRE and browser plugin in PeppermintOS Two or Ubuntu 11.04

How to replace the IcedTea Java JRE and it’s browser plugin with the Sun Java JRE and its browser pugin … In PeppermintOS (Two) or Ubuntu 11.04.

The Sun version is more up-to-date, and IMHO quicker.

Open a terminal and run:

sudo apt-get install ppa-purge

then

sudo add-apt-repository ppa:ferramroberto/java

then

sudo apt-get update

then

sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

At this point the “Operating System Distributor License for Java” dialog will open … use the Tab key to select and hit enter.

Another dialog will open asking “Do you accept with the DLJ license terms ?” … use the Tab key to select and hit enter.

OK, (when that’s finished) back in the terminal, run:

sudo update-alternatives --config java

You should see something like this:-

There are 2 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status

  • 0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
    1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
    2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode

Hit 2 to select the /usr/lib/jvm/java-6-sun/jre/bin/java and hit enter.
(use whatever number = /usr/lib/jvm/java-6-sun/jre/bin/java)

Now run:

sudo update-alternatives --config mozilla-javaplugin.so

You should see something like this:-

There are 2 choices for the alternative mozilla-javaplugin.so (providing /usr/lib/mozilla/plugins/libjavaplugin.so).

Selection Path Priority Status

  • 0 /usr/lib/jvm/java-6-openjdk/jre/lib/i386/IcedTeaPlugin.so 1061 auto mode
    1 /usr/lib/jvm/java-6-openjdk/jre/lib/i386/IcedTeaPlugin.so 1061 manual mode
    2 /usr/lib/jvm/java-6-sun/jre/lib/i386/libnpjp2.so 63 manual mode

Hit 2 to select the /usr/lib/jvm/java-6-sun/jre/lib/i386/libnpjp2.so and hit enter.
(use whatever number = /usr/lib/jvm/java-6-sun/jre/lib/i386/libnpjp2.so)

You can now go to this website:
http://www.java.com/en/download/help/testvm.xml

It should report:-
Vendor: Sun Microsystems Inc
Version: Java SE 6 Update 26


You can always use update-alternatives to change back if you wish.

Thanks for that Mark, done.

No problem :slight_smile: