Ubuntu10.10Linux JDK1.6 installation and environment variable settings

Source: Internet
Author: User
1. test Environment Ubuntu10.10/jdk1.6u212. installation Process 2.1 Download the jdk installation file, download bin format 2.2 copy the installation file to/home/java 2.3 use "chmod777" or "chomd + x" to add executable permissions to the file sudochomd + xjdk-6u21-linux-i586.bin2.4 to run the file sudo. jdk-6u21-linux-i5

1. Test Environment

Ubuntu 10.10/JDK

2. Installation Process

2.1 Download the jdk Installation File. Download the bin format here.

2.2 copy the installation file to/home/java

2.3 use "chmod 777" or "chomd + x" to add executable permissions to the file

Sudo chomd + x jdk-6u21-linux-i586.bin

2.4 run the file

Sudo./jdk-6u21-linux-i586.bin

After running, the program automatically decompress and generate the corresponding directory. You can see the following content:

For more information on what data Registration collects and

How it is managed and used, see:

Http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html

Press Enter to continue .....

Done.

At this point, jdk installation is complete. Add the environment variable below:

3. Add environment variables:

3.1 open/etc/profile

3.2. Add the following content before "umask 022:

Export JAVA_HOME =/home/yx/Java/jdk1.6.0 _ 21

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

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

3.3 save the file and close the current window

3.4 use source/etc/profile to make the configuration take effect

3.5 enter java-version on the terminal for testing. The following content is displayed:

Java version "1.6.0 _ 21"

Java (TM) SE Runtime Environment (build 1.6.0 _ 21-b06)

Java HotSpot (TM) Server VM (build 17.0-f8, mixed mode

At this point, jdk installation on Ubuntu 10.10 is complete.

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.