Install JDK1.6 in Ubuntu

Source: Internet
Author: User
This article describes how to install JDK 1.61 in Ubuntu, first go here to download the JDK 1.6linux version, I download is the latest jdk-6u20-linux-i586.bin; if there is no dedicated download tool, after being downloaded using firefox, it will be saved in/home/username/download /.. .; 2. Copy or cut the jdk-6u20-linux-i586.bin to/home/username /...

This article describes how to install JDK in Ubuntu

1. First download the JDK1.6 Linux version here, I download the latest jdk-6u20-linux-i586.bin; if there is no dedicated download tool, after being downloaded using firefox, it will be saved in/home/username/download /.. .;

2, copy or cut the jdk-6u20-linux-i586.bin to/home/username/...; (because I am a lazy, too lazy Chinese folder name );

3. Start the terminal: Enter the command sudo-s./jdk-6u20-linux-i586.bin;

4. Press enter all the way until you ask whether to install the SDK. If yes/no is displayed, enter yes/y to press Enter;

5. After the preceding operation is complete, configure JDK. Enter the sudo gedit/etc/profile command and paste the following information in the last line of the pop-up file:

Configuration code
# Set java environment

# Note that bestupon should be replaced with your user name

JAVA_HOME =/home/bestupon/jdk1.6.0 _ 20

Export JRE_HOME =/home/bestupon/jdk1.6.0 _ 20/jre

Export CLASSPATH =.: $ JAVA_HOME/lib: $ JRE_HOME/lib: $ CLASSPATH

Export PATH = $ JAVA_HOME/bin: $ JRE_HOME/bin: $ PATH

# Set java environment

6. After restarting your host, enter the following information in the terminal: java-version, indicating that the installation configuration is correct.

Terminal code
Bestupon @ bestupon-laptop :~ $ Java-version
Java version "1.6.0 _ 20"
Java (TM) SE Runtime Environment (build 1.6.0 _ 20-b02)
Java HotSpot (TM) Server VM (build 16.3-b01, mixed mode)
Bestupon @ bestupon-laptop :~ $

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.