多版本jdk共存--alternatives命令用法
说明:
alternatives是Linux下的一个功能强大的命令,只能在root权限下执行;如系统中有几个命令功能十分类似,却又不能随意删除,那么可以用 alternatives 来指定一个全局的设置
alternatives常用于同一个系统中安装同一软件的多个版本。比如为了开发需要,我需要安装JDK1.6,同时还需要JDK1.7,我怎么样才能忽略安装路径,按照我自己的意思,使用我想要的java版本呢?
使用方法:[root@localhost tools]# alternatives
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
[--initscript ]
[--slave ]*
alternatives --remove
alternatives --auto
alternatives --config
alternatives --display
alternatives --set
common options: --verbose --test --help --usage --version
--altdir --admindir ##解释:
alternatives --install
其中&#