Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
update-alternatives: error: no alternatives for
update-alternatives: error: no alternatives for
update-alternatives: error: no alternatives for

Any idea how to correct this?

share|improve this question
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.

If you would like to use Proprietary Closed Source features in Java you will need to install the version from (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?

Oracle Offers Links to Java 7, you have to go out of your way to get Java 6.

The previous edit to my post by "broiyan" is depricated.

share|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

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

deb 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/ /usr/lib/jvm/java-6-sun/jre/lib/amd64/ 1

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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