Installing jdk1.6 Jdk-6u45-linux-x64.bin on a 64-bit Linux machine

Source: Internet
Author: User

Install on Linux platforms:

1. Download: Jdk-6u45-linux-x64.bin

2. Next, log in to the Linux system and give the EXECUTE permission with the following command:

chmod +x Jdk-6u21-linux-x64.bin

3. Perform the installation of the JDK.

./jdk-6u45-linux-x64.bin

4. Configure the environment variables.

The configuration of environment variables is divided into several ways, depending on your choice of configuration:

Mode one: Configure Java_home and PATH and Class_path in the/etc/profile file

Because such a setting will work for the user's shell, it will have an impact on system security.

is at the end of this file add:

Export Java_home=/home/software/jdk1.6.0_45export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/ Tools.jarexport path= $PATH: $JAVA _home/bin
Execution Source/etc/profile is configured to take effect immediately

Way two:

Modify the. bashrc file to configure environment variables:

#vi. BASHRC

Export Java_home=/home/software/jdk1.6.0_45export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/ Tools.jarexport path= $PATH: $JAVA _home/bi

After the configuration is complete, use the logout command to exit and then log back in to make it effective.

Verify that the installation is successful and use java-version to view it.

[[email protected] jdk1.6.0_45]# Java-versionjava version "1.6.0_45" Java (TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot (TM) 64-bit Server VM (build 20.45-b01, Mixed mode)





Installing jdk1.6 Jdk-6u45-linux-x64.bin on a 64-bit Linux machine

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.