Install JDK in Ubuntu

Source: Internet
Author: User
System: Ubuntu10.04.2 (LTS) desktop-i386 installation process: 1. Download The jdk-6u27-linux-i586.bin connection from the Oracle website

System: Ubuntu 10.04.2 (LTS) desktop-i386

Installation Process:

1. Download jdk-6u27-linux-i586.bin from Oracle Official Website

Connection http://www.oracle.com/technetwork/java/javase/downloads/index.html


2. Place the jdk-6u27-linux-i586.bin in a linux directory, such as/usr/lib/java

Go to the directory, get root privileges, execute the jdk-6u27-linux-i586.bin (note that root has executable permissions on the file), install, wait for the installation to complete, the process may need to confirm the information, or, you may need to press enter to complete the installation.

3. Modify the/etc/environment file, as shown in the following figure:

  1. PATH ="/Usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/lib/java/jdk1.6.0 _ 27/bin"
  2. JAVA_HOME ="/Usr/lib/java/jdk1.6.0 _ 27"
  3. CLASSPATH ="/Usr/lib/java/jdk1.6.0 _ 27/lib"
4. Run the following command to configure JDK:
  1. $ Sudo update-alternatives -- install/usr/bin/java/usr/lib/java/jdk1.6. 0_27/bin/java300
  2. $ Sudo update-alternatives -- install/usr/bin/javac/usr/lib/java/jdk1.6. 0_27/bin/javac300
5. Execute the command
  1. $ Java-version
The Java version is successfully installed.

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.