Since 11.10 Ubuntu does not provide the sun-java-jdk, how do I install it?
migrated from stackoverflow.com Nov 4 '11 at 16:01This question came from our site for professional and enthusiast programmers. |
|||||||||||||
|
|||||||||||||
|
NOTE: Some of the contents of this answer might have become obsolete and there are some comments where people have reported problems. You're advised to read through the comments first. -- Ubuntu 11.10 Oneric
[Source] Ubuntu 12.04 PreciseClean up the historical open jdk:
Add a new repo and install the sdk:
If you want the JRE and the browser plugin:
[Source] Ubuntu 12.04 (Precise Pangolin) - another wayThanks to the comments, please note that you can try this method too: http://www.liberiangeek.net/2012/04/install-oracle-java-jdk-7-in-ubuntu-12-04-precise-pangolin/ Make the sun java the defaultYou may want to also add the following
You should get the following Selection Path Priority Status0 /usr/lib/jvm/java-7-oracle/bin/java 1 auto mode 1 /usr/lib/jvm/java-7-oracle/bin/java 1 manual mode * 2 /usr/lib/jvm/java-7-oracle/jre/bin/java 1 manual mode Press enter to keep the current choice[*], or type selection number: 2 Select (2) and press enter Now running:
Returns: java version "1.7.0_04" Java(TM) SE Runtime Environment (build 1.7.0_04-b20) Java HotSpot(TM) Server VM (build 23.0-b21, mixed mode) |
|||||||||||||||||||||
|
|
There is very good page on official Ubuntu wiki. There you can find all recommended methods. I've used this excellent automatic script. Make sure git is installed:
Sun/Oracle Java 1.6.0Build local debs:
Script will build packages from source and place them in local repo, then they can be installed e.g.:
You can see all available packages in Remember to select the right version:
To setup everything else (like browser plugin, keytool, etc.) you can use this (it will be a long list!):
The script is a wrapper for this Debian script, if you're curious ;) Oracle Java 1.7.0_51There is an Issue 123 currently in OAB and a pull request Here is the patched vesion:
Read more on AskUbuntu |
|||||||||||||||||||||
|
|
You can install the official package from Oracle : http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html choose linux as your platform |
|||||
|
protected by Community♦ Mar 6 '12 at 23:15
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?