errors seen when selecting Sun Java 6

939 Views Asked by At

On Ubuntu 10.10 (Maverick), I have both java-6-openjkd and java-6-sun as shown with the update-java-alternatives -l command.

However when I set the alternative to Sun, via the command

sudo update-java-alternatives -s java-6-sun

I see the following:

update-alternatives: error: no alternatives for xulrunner-1.9-javaplugin.so.
update-alternatives: error: alternative /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so for mozilla-javaplugin.so not registered, not setting.
update-alternatives: error: no alternatives for xulrunner-1.9-javaplugin.so.

Does this result in xulrunner being non-functional or simply result in it continuing to use the Open JVM? Likewise I am posing the similar question in regard to mozilla-javaplugin.so.

Update Switching back to OpenJDK also results in an error:

$ sudo update-java-alternatives -s java-6-openjdk

update-alternatives: error: no alternatives for xulrunner-1.9-javaplugin.so.

What if anything can be done about this?

Update I am swayed by this commentary on why instructions were written to install Sun Java that it will be less risky human attention/time-wise to use Sun. I am using and also API interfacing to an Web Start application where the support materials all refer to Sun.

2

There are 2 best solutions below

0
On

Quoted from the same place of @Aeterna

Actually you can simply add the partner repository in /etc/apt/sources.list :

deb http://archive.canonical.com/ubuntu lucid partner

If you are not on lucid, replace lucid with your distribution (you can get it with lsb_release -c).

If you still have problem with the java plugin, you can do like I did, follow the instructions here :

sudo update-alternatives --install /usr/lib/mozilla/plugins/mozilla-javaplugin.so mozilla-java

If you are not on a 64 bits system, replace amd64 by i386.

5
On

Sun-6-java is being phased out by Oracle and is no longer supported. This is why there are no plugins available for your browser anymore.

OpenJDK is the only stack you should be using as sun-java-6 is outdated and deprecated.

http://en.wikipedia.org/wiki/OpenJDK

If you would like to use Proprietary Closed Source features in Java you will need to >install the version from java.com (which is also OpenJDK so don't really see any benefit >over the Ubuntu Repository version).

OpenJDK is backwards compatible with the old Sun-6-java. What can you not run with OpenJDK?

Quoted from this question.