JDK选项配置
1.选项配置
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk1.6.0_45/bin/javap 1
update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
update-alternatives --config javac
update-alternatives --config java
update-alternatives --config javaws
update-alternatives --config jar
update-alternatives --config javap
update-alternatives --config javadoc
2.建立连接
cd /usr/bin/
ln -s -f /usr/lib/jvm/jdk1.6.0_45/bin/javac
ln -s -f /usr/lib/jvm/jdk1.6.0_45/bin/java
ln -s -f /usr/lib/jvm/jdk1.6.0_45/bin/javaws
ln -s -f /usr/lib/jvm/jdk1.6.0_45/bin/jar
ln -s -f /usr/lib/jvm/jdk1.6.0_45/bin/javap
ln -s -f /usr/lib/jvm/jdk1.6.0_45/bin/javadoc