Menu Home

JDK版本切换

Install

sudo update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_67/bin/java 50
sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_67/bin/javac 50
sudo update-alternatives --install /usr/bin/javah javah /opt/jdk1.7.0_67/bin/javah 50
sudo update-alternatives --install /usr/bin/javaws javaws /opt/jdk1.7.0_67/bin/javaws 50
sudo update-alternatives --install /usr/bin/javap javap /opt/jdk1.7.0_67/bin/javap 50

Config

sudo update-alternatives --config javac
sudo update-alternatives --config java
sudo update-alternatives --config javaws
sudo update-alternatives --config javap
sudo update-alternatives --config jar
sudo update-alternatives --config jarsigner

Categories: 系统管理

Tagged as:

lnmcc

Leave a Reply

Your email address will not be published.