Sunday, December 19, 2010

How to install Sun JDK on Ubuntu 10.10 “Maverick meerkat”?

Surprised to find that Sun Java packages were missing in Ubuntu Maverick (10.10). The new Ubuntu release uses OpenJDK by default. I needed sun-java6-jdk package to use a eclipse IDE development Android ADT plugin.

Found the solution in this StackOverFlow thread How to install Sun JDK on Ubuntu 10.10 “Maverick meerkat”?


# Add this line to your /etc/apt/sources.list file
deb http://archive.canonical.com/ubuntu maverick partner

sudo apt-get update

sudo apt-get install sun-java6-jdk 

# Get rid of OpenJDK 
sudo apt-get remove openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib 



19 comments:

  1. Very useful, thanks!

    ReplyDelete
  2. You forget add "deb" before link.

    ReplyDelete
  3. Thanks for pointing that out! Fixed!

    ReplyDelete
  4. Saved me ... so cheers to you

    ReplyDelete
  5. Very usefull for quick switch to the sun java products and some others (canonical partners).

    ReplyDelete
  6. Thanks!! a lot worked for me!!

    ReplyDelete
  7. Thank you, this was really brief and useful. I wish one day we could find solutions for every problem like this one :D.

    ReplyDelete
  8. very good, thank you....the Ubuntu community is the best.

    ReplyDelete
  9. does open jdk has any issue with eclipse? why u go for sun jdk? Can you point out the reason?

    It will be useful for all..!

    Thanks!

    ReplyDelete
  10. Android ADT plugin for Eclipse needs Sun JDK.

    ReplyDelete
  11. thanks...was really helpful

    ReplyDelete
  12. Sujarwe, Can you give more information about your problem.

    What errors are you getting?

    ReplyDelete
  13. Just tried your method, but got this error message from the terminal:


    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies.
    sun-java6-jdk : Depends: sun-java6-bin (>= 6.26-2maverick1) but it is not going to be installed
    E: Broken packages

    Any ideas what could have caused this?

    ReplyDelete
  14. redaxe90 can't help you. Perhaps you can report a broken packages bug.

    ReplyDelete

You can leave a comment here using your Google account, OpenID or as an anonymous user.

Popular Posts