Why is alternatives command used when installing Java on a Linux machine

后端 未结 3 563
借酒劲吻你
借酒劲吻你 2021-01-08 01:03

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.         


        
3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-08 02:07

    There is still no good explanation on the priority, but it seems larger numbers are considered to have higher priority than smaller numbers.

    alternatives --display java also displays the priority. I noticed /jre-1.4.2 is added with a priority of 1420, so it would make sense the number the priorities according to the version number of the jre.

提交回复
热议问题