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.