为什么在Linux机器上安装Java时使用替代命令 [英] Why is alternatives command used when installing Java on a Linux machine

查看:163
本文介绍了为什么在Linux机器上安装Java时使用替代命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Linux机器上安装Java时需要使用以下命令(参见教程中的命令)。

The below command is need when installing Java on a Linux machine (saw the command in a tutorial).

alternatives --install /usr/bin/java java /usr/java/jre1.7.0_01/bin/java 20000

man alternatives 终端上的命令说:


备选方案 - 维护符号链接确定默认命令

alternatives - maintain symbolic links determining default commands

我不明白为什么在安装Java(JRE或JDK)时需要这个命令,以及 20000 在行尾指的是?请注意解释。

I dont understand why we need this command when installing Java(JRE or JDK), and what does 20000 at the end of the line refers to? Please care to explain.

推荐答案

它不是特定于Linux,只是某些发行版。最好是维护软件或库的多个版本,并在它们之间轻松切换。您的应用程序仅指向符号链接,您可以随时轻松切换,而无需完成应用程序的所有配置。
我不知道20000的意思,但这里是联机帮助页面: http: //linux.about.com/library/cmd/blcmdl8_alternatives.htm (但你的系统也应该有这个)

It's not specific to Linux, only some of the distributions. It's better for maintaining multiple versions of the software or libraries and easily switch between them. Your applications are only pointing to the symbolic link, which you can easily switch any time and don't have to go through all the configurations of your applications. I don't know what the 20000 means, but here's the manpage: http://linux.about.com/library/cmd/blcmdl8_alternatives.htm (but you should have that in your system too)

这篇关于为什么在Linux机器上安装Java时使用替代命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆