Install and configure JDK in 64-bit redhat6.0

Source: Internet
Author: User
System: RedHat6.064-bit jdk: jdk-7u1-linux-i586.tar.gz unzip package: unzip root@www.linuxidc.comserver?tarzxvfjdk-7u1-linux-i586.tar.gz Rename to jdk1.7: [root@www.linuxidc.comserver] # mvjdk1.7.0 _ 01/jdk1.7 &

System: RedHat6.0 64-bit

Jdk: jdk-7u1-linux-i586.tar.gz

Decompress the package:
[Root @ www.linuxidc.com server] # tar zxvf jdk-7u1-linux-i586.tar.gz
Rename jdk1.7:
[Root @ www.linuxidc.com server] # mv jdk1.7.0 _ 01/jdk1.7 # change the file name to jdk1.7

Configure the environment variable: (/etc/profile) modify this file to take effect for all users.

[Root @ www.linuxidc.com server] # vi/etc/profile

Add:

Export JAVA_HOME =/server/jdk1.7
Export CLASSPATH =.: $ JAVA_HOME/lib: $ JAVA_HOME/jre/lib
Export PATH = $ PAHT: $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin: $ CLASSPATH

Save and exit.
Test successful:
[Root @ www.linuxidc.com server] # java-version
Java version "1.7.0 _ 01"
Java (TM) SE Runtime Environment (build 1.7.0 _ 01-b08)
Java HotSpot (TM) Server VM (build 21.1-b02, mixed mode)

[Root @ www.linuxidc.com server] # javac-version
Javac 1.7.0 _ 01

Indicates that the installation is successful!

Related Article

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.