Install java in ubuntu

Source: Internet
Author: User
Install java under ubuntu-general Linux technology-Linux programming and kernel information. The following is a detailed description. Open the terminal and execute the following command:
Sudo apt-get install sun-java6-jre

We recommend that you install JDK:
Sudo apt-get install sun-java6-jdk # Do not install jdk after jre is installed

Or use the new software manager to search for "sun-java6-jre" and "sun-java6-jdk", tag the installation and apply, respectively.

Tip: During the installation process, you need to answer whether you agree to use the Protocol (the red-blue prompt page in the terminal). Press the tab key to OK, and press enter to install it normally.

Set the current default java interpreter:
Sudo update-alternatives -- config java

The following figure is displayed after execution:

There are two options available, both of which provide "java" <

Select option
-----------------------------------------------
1/usr/bin/gij-4.2
* + 2/usr/lib/jvm/java-6-sun/jre/bin/java

To maintain the default value *, press the Enter key or enter the selected number:

Enter the number before the row containing "sun. As shown above, enter 2 and press enter to confirm.

Install the browser's JAVA Plugin (optional ):
Sudo apt-get install sun-java6-plugin
Related Article

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.