Installing Java under Linux

Source: Internet
Author: User

Reference: http://www.cnblogs.com/caosiyang/archive/2013/03/14/2959087.html

First, the preparatory stage

① Download jdk-6u45-linux-i586.bin, upload to Linux system via XFTP

② execute ./jdk-6u45-linux-i586.binon the command line, generate the directory jdk1.6.0_45

③ Copy to/usr/share, MV Jdk1.6.0_45/usr/share

Second, configure environment variables

① added in/etc/profile

② edit the following and save

# Set Java Environment
Java_home=/usr/share/jdk1.6.0_45
Path= $JAVA _home/bin: $PATH
Classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export Java_home
Export PATH
Export CLASSPATH

③ finally executes the source command,source/etc/profile, the environment is configured to complete.

Third, see if the environment is installed successfully

Installing Java 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.