1. JDK. This is unnecessary (my name is 1.6.0 _ 03)
2. Change the permission of the Installation File. In the terminal, use the CD command to move the current directory to the directory where the jdk-6u3 -- i586-rpm.bin is located, use the LS-l command to View File permissions, and if it is executable X (execute), there is no need to change, otherwise run the command chmod 755 jdk-6u3 -- i586-rpm.bin to make the self-decompressed package file executable
3. install. Enter at the terminal. /Jdk-6u3-Linux-i586-rpm.bin, step by step according to the prompts to execute.
4. Change the environment variables. The installed version is/usr/Java/jdk1.6.0 _ 03 by default. we add it to the environment variable. Run the CD command to transfer to the etc directory, enter gedit profile, and set profile to the last three lines.
#
# End of/etc/profile
#
Add the following text:
Export java_home =/usr/Java/jdk1.6.0 _ 03
Export classpath =.: $ java_home/JRE/lib: $ java_home/lib/tools. Jar
Export jre_home = $ java_home/JRE
5. restart the system and enter Java-version on the terminal to display the following content:
Java version "1.6.0 _ 03"
(TM) se Runtime Environment (build 1.6.0 _ 03-b05)
Hotspot (TM) Client VM (build 1.6.0 _ 03-b05, mixed mode, sharing)
The environment variable is successfully set.