alternatives version 1.3.49.3 - Copyright (C) 2001 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.
usage: alternatives --install <link> <name> <path> <priority>
[--initscript <service>]
[--slave <link> <name> <path>]*
alternatives --remove <name> <path>
alternatives --auto <name>
alternatives --config <name>
alternatives --display <name>
alternatives --set <name> <path>
common options: --verbose --test --help --usage --version
--altdir <directory> --admindir <directory>
1.安装
#alternatives --install /usr/bin/java java /home/server/jdk1.6.0_21/bin/java 300
2.查询
#alternatives --display java
3.删除
#alternatives --remove java /home/server/jdk1.6.0_21/bin/java
4.配置 可以在各个版本之间选择
#alternatives --config java