主要参考下面两个链接:
http://blog.ogorkis.net/2012/12/setting-up-ubuntu-1204-for-java.html
http://jingyan.baidu.com/article/b0b63dbfd5db8b4a48307027.html