Linux centos 6.x Development Configuration documentation-JDK

Source: Internet
Author: User

1. Check the JDK in the current operating system:Rpm-Qa | grep Java(Or
Rpm-Qa | grep JDK) (Or
Rpm-Qa | grep gcj)

2. Delete the built-in JDK:Yum-y removeJava -*

3. Download JDK:Http://www.oracle.com/technetwork/java/javase/downloads/index.html

4. decompress the package:Tar zxvf JDK -*

5. Mobile:MV jdk1.7.0 _ 03/*/home/JDK

6. Edit the system environment variables:Vim/etc/profile

7. Add the JDK path to the system environment variable:
Export java_home =/home/JDK
Export Path = $ path: $ java_home/bin
Export classpath =.: $ java_home/JRE/lib/RT. jar: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar

8. Verify JDK:Java-version/
Javac-version(Logout or restart after installation)

Method 2: (not recommended because binfile download is no longer available on the official website)
1, download: jdk-6u22-linux-i586-rpm.bin
2, installation: chmod 777 jdk-6u22-linux-i586-rpm.bin->./jdk-6u22-linux-i586-rpm.bin
3. Edit the system environment variable gedit/etc/profile.
Export java_home =/usr/Java/jdk1.6.0 _ 22
Export classpath = $ classpath: $ java_home/lib: $ java_home/JRE/lib
Export Path = $ java_home/bin: $ java_home/JRE/bin: $ path: $ homr/bin

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.