after login
1.sudo apt-get install sun-java6-jdk
2.sudo update-alternatives --config java
3.sudo vi /etc/environment
add CLASSPATH=.:/usr/lib/jvm/java-6-sun/lib
add JAVA_HOME=/usr/lib/jvm/java-6-sun
4.sudo vi /etc/jvm
add or move to top /usr/lib/jvm/java-6-sun
5.java -version
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)
refer to http://wiki.ubuntu.org.cn/index.php?title=Qref/More&variant=zh-tw
沒有留言:
張貼留言