The following environment is under Fedora8. 1. first go to the SUN official website (http://java.sun.com/javase/downloads/index.jsp) to download JDK1.6.0 (jdk-6u3-linux-i586-rpm.bin) 2. Then copy to/usr/local # cpjdk-6u3-linux-i586-rpm.bin/usr/local3. add executable permissions to all users #
The following environment is in Fedora 8.
1. first go to the SUN official website (http://java.sun.com/javase/downloads/index.jsp) download JDK1.6.0 (jdk-6u3-linux-i586-rpm.bin)
2. Then copy to/usr/local
# Cp jdk-6u3-linux-i586-rpm.bin/usr/local
3. Add executable permissions to all users
# Cd/usr/local
# Chmod + x jdk-6u3-linux-i586-rpm.bin
4. Installation
#./Jdk-6u3-linux-i586-rpm.bin
The file jdk-1_6_0_03-linux-i586.rpm is generated, and executable permissions are also added to all users
# Chmod + x jdk-1_6_0_03-linux-i586.rpm
Installer
# Rpm-ivh jdk-1_6_0_03-linux-i586.rpm
If the installation protocol is displayed, simply accept it.
5. Set Environment Variables
# Vi/etc/profile
Add at the end
# Set java environment
JAVA_HOME =/usr/java/jdk1.6.0 _ 03
CLASSPATH =.: $ JAVA_HOME/jre/lib/rt. ja
PATH = $ JAVA_HOME/bin: $ PATH
Export JAVA_HOME CLASSPATH PATH
Run the echo command to check the environment variable settings.
# Echo $ JAVA_HOME
# Echo $ CLASSPATH
# Echo $ PATH
Check whether JDK is successfully installed.
# Java-version
6. OK.