1.download sun jdk7
2.extract jdk1.7
# tar zxvf jdk-7u4-linux-x64.tar.gz
3.move jdk to /usr/lib/jvm/
#mv jdk1.7.0_04 /usr/lib/jvm/
4.install sun jdk
#update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_04/bin/javac 1
#update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.7.0_04/bin/javaws 1
#update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_04/bin/java 1
5.select default java
#update-alternatives --config javac
#update-alternatives --config java
#update-alternatives --config javaws
6.confirm java version
#java -version
沒有留言:
張貼留言