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.

link|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
feedback

2 Answers

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.

link|improve this answer
feedback

You can install by apt-get:

apt-get install sun-java6-jre sun-java6-jdk
link|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
feedback

Your Answer

 
or
required, but never shown

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