update-alternatives has two entries, one in auto and other in manual
The entry marked with *
signifies the current selection. It is the default only in the sense as you do not have to enter anything in update-alternatives
if you do not want to change it.
The system default is always auto
, which means that the setting will change to always choose the alternative with the highest priority, determined by the package maintainers. The asterisk appearing in a manual
line means that someone has changed the alternative. The system will not alter this choice, even when priorities are changing when updates are installed. So yes, manual mode always has preference over auto mode. Apparently, someone has (manually!) changed the setting for the java
binary, but the current alternative is still the same as would be chosen by the system in auto
mode, therefor the entry is appearing twice.
If you would prefer to let the system choose the "best" alternative for the java
path automatically, select 0
here. Be aware that especially Java applications might be picky about the used implementation and version, so be careful what you change. Java applications that are available from the Debian or Ubuntu repositories, respectively, should always be able to run with the default JRE.
Related videos on Youtube
![terdon](https://i.stack.imgur.com/B5cTn.png?s=256&g=1)
terdon
Elected moderator on Unix & Linux. I've been using Linux since the late '90s and have gone through a variety of distributions. At one time or another, I've been a user of Mandrake, SuSe, openSuSe, Fedora, RedHat, Ubuntu, Mint, Linux Mint Debian Edition (basically Debian testing but more green) and, for the past few years, Arch. My Linux expertise, such as it is, is mostly on manipulating text and regular expressions since that represents a large chunk of my daily work.
Updated on September 18, 2022Comments
-
terdon almost 2 years
On my Ubuntu 15.04,
sudo update-alternatives --config java
shows:Selection Path Priority Status ------------------------------------------------------------ 0 /usr/lib/jvm/java-8-oracle/jre/bin/java 1074 auto mode 1 /opt/java32/jdk1.7.0_71/jre/bin/java 1 manual mode 2 /usr/lib/jvm/java-1.7.0-openjdk-i386/jre/bin/java 10 manual mode 3 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 manual mode 4 /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java 1070 manual mode * 5 /usr/lib/jvm/java-8-oracle/jre/bin/java 1074 manual mode
Why is the single path,
/usr/lib/jvm/java-8-oracle/jre/bin/java
having two entries, one inauto
and the other inmanual
mode?Even though both the paths have same priority 1024, and the
manual
path is marked as the default one. Does manual mode always have higher preference over auto mode?