1. Download the JDK6 installation package, my 32-bit system so choose Jdk-6u35-linux-i586.bin
:http://www.oracle.com/technetwork/java/javase/downloads/jdk6u35-downloads-1836443.html
2. Unzip the Jdk-6u35-linux-i586.binand extract the jdk-6u35-linux-i586 folder
$ chmod u+x jdk-6u35-linux-i586.bin
$ ./jdk-6u35-linux-i586.bin
3. Copy extract jdk-6u35-linux-i586 folder to /usr/lib
$ sudo mkdir-p/usr/lib/jvm/
$ cp-r jdk-6u35-linux-i586/usr/lib/jvm/jdk-6u35-linux-i586
4. The JDK is installed in this section, and the next step is to configure
To configure environment variables:
Vim ~/.bash.rc
At the end of the file, save and close the file by adding the following:
Export Java_home=/usr/lib/jvm/jdk-6u35-linux-i586export Jre_home=${java_home}/jreexport CLASSPATH=.:${JAVA_HOME}/ Lib:${jre_home}/libexport Path=${java_home}/bin:${jre_home}/bin: $PATH
Ubuntu Java Development Environment JDK installation