Http://blog.chinaunix.net/uid-12115233-id-3304951.html
jdk:jdk-6u1-linux-i586tomcat:apache-tomcat-7.0.2.tar.gz 1,make Dir/usr/local/java (build Java directory)
2. Upload jdk to Java directory 3,sh jdk-6u1-linux-i586.bin (install JDK) See the installer is asking you whether you honor the License Agreement page, enter, the space can be, read the agreement. A line appears: Do you aggree to the above license terms? The [Yes or No] installer is asking if you would like to comply with the license agreement you have just seen. Of course agree, enter "Y" or "yes" to return. 4, enter at the command line: Vi/etc/profileAdd the following content to the inside
Click (here) to collapse or open
- Java_home=/usr/local/java/jdk1.6.0_01
- Path= $JAVA _home/bin: $PATH
- Classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
- Export Java_home
- Export PATH
- Export CLASSPATH
variable to be effective and login again 5. Enter the/usr/bin/directory Cd/usr/binln-s-f/usr/java/jdk1.6.0_01/jre/bin/javaln-s-f/usr/java/jdk1.6.0_01/bin/javac 6. At the command line, enter java-versionScreen Output: java Version "jdk1.6.0_01"Java (TM) 2 Runtime environment, Standard Edition (build jdk1.6.0_01)Java HotSpot (TM) Client VM (build jdk1.6.0_01, mixed mode) 7. Installation JDK1.6 complete.
Installing the JDK environment variable configuration on Linux