1. download jdk
Like JDK8: http://download.oracle.com/otn-pub/java/jdk/8u101-b13/jdk-8u101-linux-i586.tar.gz
2. cp jdk to /usr/java/
3. unzip jdk
> sudo tar -zxf jdk.tar.gz
4. update the /usr/java/latest
> sudo ln -s /usr/java/jdk1.8 latest
5. update /usr/bin
> cd /usr/bin
> ls -l | grep '/usr/java'
然后修改ln为最新的jdk1.8
6. update /etc/profile