JDK6.0 configuration skills under Fedora8

Source: Internet
Author: User
Linux is useless in some days. Last night SUNJDK6.0Update5 was installed and configured on Fedora8, and the process was very rigid. Here we only emphasize some error-prone places. 1. log on to sun.com to download the latest JDK. I have the jdk-6u5-linux-i586-rpm.bin and save it in the directory "~ . 2. Because the binfile does not have the executable permission, execute the command on the terminal: chmod777 ~ Jdk-6u5-li

Linux is useless in some days. Last night, sun jdk 6.0 Update 5 was installed and configured on Fedora 8. The process was very rigid. Here we only emphasize some error-prone places.

1. log on to sun.com to download the latest JDK. I have the jdk-6u5-linux-i586-rpm.bin and save it in the directory "~ .

2. Because the binfile does not have the executable permission, run the command chmod 777 ~ on the terminal ~ /Jdk-6u5-linux-i586-rpm.bin.

3. log on to the root user and execute the binfile, for example :~ /Jdk-6u5-linux-i586-rpm.bin.

4. Configure the environment variables. Run vi/etc/profile with the root permission and add the following lines at the end of the file:
Export JAVA_HOME =/usr/java/jdk1.6.0 _ 05
Export PATH = $ JAVA_HOME: $ PATH
Export CLASSPATH = $ JAVA_HOME/lib
And save.

5. logout is complete. Run java-version on the terminal to check whether it is java version "1.6.0 _ 05 ". If yes, the operation is successful. If it fails, change the preceding exports:

Export JAVA_HOME =/usr/java/jdk1.6.0 _ 05
Export PATH =/usr/java/jdk1.6.0 _ 05: $ PATH
Export CLASSPATH =/usr/java/jdk1.6.0 _ 05/lib
The reason for this change is that "$ JAVA_HOME" in "PATH = $ JAVA_HOME: $ PATH" is not parsed by the system. I don't know why it was not resolved by the system. Maybe it would be enough to restart it.

In the configuration process, note that: export PATH = $ JAVA_HOME: $ PATH, but cannot be written as export PATH = $ PATH: $ JAVA_HOME. That is to say, pay attention to the order of order, because the original $ PATH contains "/usr/bin", and there is also a java command in "/usr/bin, this java is JDK in/usr/share.

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.