1

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.

1
  • 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, 2010 at 13:57

2 Answers 2

3

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.

1

You can install by apt-get:

apt-get install sun-java6-jre sun-java6-jdk
1
  • 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, 2010 at 7:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .