0: Download JDK. Go to the official website to download the linux version of JDK: jdk-6u26-linux-i586.bin. Of course you can also use sudoapt-getinstallsun-java6-jdk, but the speed is very slow. 1. Move the file to the/opt/directory sudocpjdk-6u26-linux-i586.bin/opt/2: Modify permissions. $ Sudochmod + x/opt/jdk-
0: Download JDK.
Go to the official website to download the linux version of JDK: jdk-6u26-linux-i586.bin. Of course you can also use sudo apt-get install sun-java6-jdk, but the speed is slow.
1. Move the file to the/opt/directory.
Sudo cp jdk-6u26-linux-i586.bin/opt/
2: Modify permissions.
$ Sudo chmod + x/opt/jdk-6u26-linux-i586.bin
3: Install.
Switch to the opt directory and run "sudo sh/Jdk-6u26-linux-i586.bin",
4. Configure Environment Variables
Configure classpath and modify the environment variables of all users
(1)$ Sudo gedit ~ /. Profile, add the following content to the file:
Export JAVA_HOME =/home/hoo/Program/jdk1.6.0 _ 26
Export CLASSPATH = $ CLASSPATH: $ JAVA_HOME/lib: $ JAVA_HOME/jre/lib
Export PATH = $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin: $ PATH
(2)$ Source ~ /. Profile
(3)$ Java-version to test whether the installation is successful.
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2