Installing JDK under Linux

Source: Internet
Author: User

1 upload the JDK that will be installed to the Linux system first

2 Move the uploaded JDK to the/usr/local folder

MV jdk-6u24-linux-i586.bin/usr/local/

3 Go to this folder

Cd/usr/local

4 Add an executable permission to the JDK you just moved over

chmod 777 Jdk-6u24-linux-i586.bin

After successful execution of the flag is LS view, the file becomes dark

After 5, execute the file and complete the installation.

./Jdk-6u24-linux-i586.bin

(If the. bin file is not, but the. tar.gz file, you can use the TAR-ZXVF jdk-6u24-linux-i586.tar.gz command to decompress)

When you are finished, a new folder is generated under the folder jdk1.6.0_24

6 Change the new folder jdk1.6.0_24 to JDK

MV JDK1.6.0_24/JDK

7 Add the JDK to the Java environment variable

(1) Open/etc/profile

Gedit/etc/profile

(2) Add environment variables at the end of the file

Java_home=/usr/local/jdk

Path= $PATH: $JAVA _home/bin

(3) Execute the profile file to make the changes effective

Source/etc/profile

8 Test if the JDK installation was successful

Java-version

When the interface shown appears, the JDK installation is successful

Installing JDK under Linux

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.