When and Why run alternatives --install java jar javac javaws on installing jdk in linux

前端 未结 6 1758
耶瑟儿~
耶瑟儿~ 2021-02-14 08:56

To install java in linux (I used CentOS, RHEL is same too), I used this command

rpm -Uvh /path/to/binary/jdk-7u55-linux-x64.rpm

and verified java

6条回答
  •  野性不改
    2021-02-14 09:19

    Maybe, just the guide is outdated.

    After you install the rpm, you can check:

    alternatives --display java

    to see if you can see the new version is controlled by alternative, if not you need to "--install" them; otherwise, I think you can just skip "--install" part.

提交回复
热议问题