Install Sun JDK 1.6 above Ubuntu 11

Source: Internet
Author: User

Install Install


sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get Update
sudo apt-get install sun-java6-jdk sun-java6-plugin




Ubuntu 11.10 Oneric
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get Update
sudo apt-get install sun-java6-jdk sun-java6-plugin


Ubuntu 12.04 Precise

Clean up the historical open JDK:

sudo apt-get purge openjdk*

Add a new repo and install the SDK:

sudo add-apt-repository ppa:eugenesan/java
sudo apt-get update
sudo apt-get install Oracle-java7-installer

If you want the JRE and the browser plugin:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install Oracle-java7-installer

[Source] Make the Sun Java the default

Want to also add the following

sudo update-alternatives--config java

You should get the following

  Selection    Path                                      Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      Auto mode
  1            /usr/lib/jvm/ Java-6-openjdk/jre/bin/java   1061      manual mode
  2            /usr/lib/jvm/java-6-sun/jre/bin/java       63        Manual Mode

Press ENTER to keep the current choice[*], or type selection number:2

Select (2) and press ENTER

Now running:

Java-version

Returns:

Java version "1.6.0_26"
Java (tm) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot (tm) Server VM (build 20. 1-B02, Mixed mode)


Original reference:

Http://superuser.com/questions/353983/how-do-i-install-the-sun-java-sdk-in-ubuntu-11-10-oneric

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.