After Ubuntu's decision to default to OpenJDK for 10.04 (which is a good decision, IMHO), Sun's (but is it still Sun, or Oracle?) JAVA somewhat "disappeared" from Ubuntu (multiverse).
That being said, some people may still need features only available in Sun's JRE/JDK, which might not yet have been Freed.
Actually, Ubuntu is still shipping it, but in its "partner" section. To add that section to your Sources and install Sun's JDK (as an example), just:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" sudo apt-get update sudo apt-get install sun-java6-jdkYou might need to accept the license (press "tab", "enter", "tab" on "Yes" then "enter"). You might also just want to install sun-java6-jre or sun-java6-plugin if you just want the (Mozilla) web browser plugin. As a side note, remember to remove OpenJDK if you do not need it, or be prepared to encounter hard to diagnose problems sometime.
sudo apt-get remove openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-libUbuntu 11.10: same operation. Just replace "lucid" por "oneiric"
Comments
[...] having trouble getting the upgrades – the extra software I like to add (like medibuntu, Java, Flash) onto the netbook; mostly, I suspect, because the servers are overloaded. I’ll wait [...]
[...] source: beeznest.wordpress.com [...]
If you don't have add-apt-repository installed, you may need to grab the package which provides it, like this:
sudo apt-get install python-software-properties
Now this worked! I am addicted to Yahoo's Literati (pseudo-Scrabble) game and Ubuntu's openjdk java and its icedtea plugin do not work at all with it. But it works great with sun-java6-plugin after following the instructions above. I would urge developers to take a look at this game to see what is missing in their open source version. It had trouble re-sizing, and playing boards were blank and would repeatedly start up after I had X'd out of them.
this is the best information available so far for sun jdk installation. Thank you very much. This has been really helpful
second that... instructions don't get better than that. I've been using linux for a couple of years now and I just hate the whole compile your code concept... and instructions like these make all the diff.
TY
Thanks for posting this. There are way too many posts explaining how to do this via the GUI, who wants a GUI?
[...] lucid partner" $ sudo apt-get update $ sudo apt-get install sun-java6-jdk (Reference http://beeznest.wordpress.com/2010/04/23/howto-install-suns-java-on-ubu… ) Then install other [...]
Great post. Just for others when you get to the license agreement 'tab' to the ok and select enter
[...] Install Sun Java JDK in Ubuntu PPKhttp://beeznest.wordpress.com/2010/04/23/howto-install-suns-java-on-ubu… [...]
Helpful and to the point.
[...] instalasi sun-jdk dapat juga dibaca disini. berhubung link instalasi JDK diatas sudah tidak bisa, ada alternatif nya disini. [...]
The only "little" drawback is that sun-java6-sdk and sun-java6-jre packages (as well as any other java packages from Oracle) are not available for 11.10/'oneiric' in specified repository.
what do you do after installing jdk on ubuntu and it says package configurations
Could you be more precise?
sudo apt-get install sun-java6-jdk
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
Any help, the package is missing.
sudo add-apt-repository "deb http://ppa.launchpad.net/ferramroberto/java/ubuntu lucid main"
sudo apt-get update
sudo apt-get install sun-java6-jdk