Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have Ubuntu. I want to install the Sun JDK version 6 using the command line (apt-get). How do I do that. What is the name of the package?

Or is the open JDK version the only option.

share|improve this question
    
Don't use OpenJDK at the moment for Swing applications. It will result in truncated controls, paint problems or other mysterious bugs. –  Mike L. Sep 14 '10 at 13:57

2 Answers 2

Assuming it's Ubuntu 10.04,

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update && sudo apt-get install sun-java6-jdk

should work.

share|improve this answer

You can install by apt-get:

apt-get install sun-java6-jre sun-java6-jdk
share|improve this answer
    
Ramesh ... I get this output. Reading package lists... Done Building dependency tree Reading state information... Done Package sun-java6-jdk is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package sun-java6-jdk has no installation candidate –  Ankur Sep 14 '10 at 7:55

Your Answer

 
discard

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.