Environment: Ubuntu9.041. Download link http://java.sun.com/javase/downloads/index.jspselect jdk-6u3-linux-i586.binto download (you can download the latest version, but be sure not to download it .... i586-rpm.bin, usually Ubuntu without rpm tools), put the jdk-6u3-linux-i586.bin in any directory such as:/home/test2, change
Environment: Ubuntu 9.04
1. Download the connection http://java.sun.com/javase/downloads/index.jsp
Select jdk-6u3-linux-i586.bin download (you can download the latest, but note that it must not be .... i586-rpm.bin, usually Ubuntu without rpm tools), put the jdk-6u3-linux-i586.bin in any directory such as:/home/test
2. Change the File Permission to executable, decompress, And: cd/home/test
Chmod u + x jdk-6u3-linux-i586.bin
Sudo./jdk-6u3-linux-i586.bin yes/no select yes, after execution side can
To view the jdk1.6.0 _ 03 folder under the test directory
3. Set Environment Variables
Add sudo vi/etc/profile at the end of the profile file
JAVA_HOME =/home/test/jdk1.6.0 _ 03
Export JRE_HOME = $ JAVA_HOME/jre
Export CLASSPATH = $ JAVA_HOME/lib: $ JRE_HOME/lib: $ CLASSPATH
Export PATH = $ JAVA_HOME/bin: $ JRE_HOME/bin: $ PATH
Save and close
4. restart the system (or you do not need to restart the system to log out first and then login)
5. view the java version
Entering java-version on the terminal will display information about the java version. jdk is installed successfully.
6. Download tomcat 6 http://apache.etoak.com/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz