Article Title: how to configure JDK6.0 in FedoraLinux8 system. Linux is a technology channel of the IT lab in China. Including desktop applications, Linux system management, kernel research, embedded systems and open source and other basic categories 1. log on to sun.com to download the latest JDK, my next is the jdk-6u5-linux-i586-rpm.bin that, 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 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.
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