I tried to follow the excellent answer to the question How to correctly remove OpenJDK and JRE and set the system use only and only Sun JDK and JRE?, but there seem to be some side effects:

root@ubuntu10:/usr/local/bin# update-java-alternatives -s java-6-sun
update-alternatives: error: no alternatives for java-rmi.cgi.
update-alternatives: error: no alternatives for mozilla-javaplugin.so.
update-alternatives: error: no alternatives for xulrunner-1.9-javaplugin.so.
update-alternatives: error: no alternatives for mozilla-javaplugin.so.
update-alternatives: error: no alternatives for xulrunner-1.9-javaplugin.so.

Any idea how to correct this?

link|improve this question

feedback

2 Answers

up vote 3 down vote accepted

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?

Additional information: While Java 7 is certainly available, Oracle is not dissuading downloads of Java 6. As of today, 2012 January 13, if you go to Oracle's java.com and browse from an Ubuntu computer, the main download link still goes to an offering of Java 6. Oracle link for Java The point here being that as of today, if Java 6 is being phased out, it certainly is not being deprecated. Sometimes the answer to the question "what can you not run with OpenJDK" is "I don't have time to find out so if third party systems were tested with Sun I will use Sun.".

link|improve this answer
Thanks +1 for this information. I wasn't aware that OpenJSK ia the same exact code Oracle uses. Since I develop on both Windows and Linux (for Android), I wanted the Java bugs to compatible with each other... I just read the link you provided that OpenJDK is going to be the Java SE 7 reference implementation. Fortunately, there is this great update-java-alternatives command that allows me to switch back painlessly. – Android Eve Nov 17 '11 at 20:09
feedback

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-javaplugin.so /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so 1

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.