System: Ubuntu10.04.2 (LTS) desktop-i386 installation process: 1. Download The jdk-6u27-linux-i586.bin connection from the Oracle website
System: Ubuntu 10.04.2 (LTS) desktop-i386
Installation Process:
1. Download jdk-6u27-linux-i586.bin from Oracle Official Website
Connection http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. Place the jdk-6u27-linux-i586.bin in a linux directory, such as/usr/lib/java
Go to the directory, get root privileges, execute the jdk-6u27-linux-i586.bin (note that root has executable permissions on the file), install, wait for the installation to complete, the process may need to confirm the information, or, you may need to press enter to complete the installation.
3. Modify the/etc/environment file, as shown in the following figure:
- PATH ="/Usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/lib/java/jdk1.6.0 _ 27/bin"
- JAVA_HOME ="/Usr/lib/java/jdk1.6.0 _ 27"
- CLASSPATH ="/Usr/lib/java/jdk1.6.0 _ 27/lib"
4. Run the following command to configure JDK:
- $ Sudo update-alternatives -- install/usr/bin/java/usr/lib/java/jdk1.6. 0_27/bin/java300
- $ Sudo update-alternatives -- install/usr/bin/javac/usr/lib/java/jdk1.6. 0_27/bin/javac300
5. Execute the command
- $ Java-version
The Java version is successfully installed.