Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses.
Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked 2. Related Hot Network Questions. Now you would like to work on a project that only supports JDK 8.
How can we make JDK 8 as the default? Each entry here is a shortcut points to the actual program, which may have more than one option i. To list all entries of alternatives in the system, use update-alternatives --get-selections.
Symbolic links in the alternatives directory can be modified by the administrator through the update-alternatives command. The alternatives system provides the update-alternatives command to create, remove, maintain, and show information about symbolic links. While these symbolic links usually point to commands, they can also point to JAR archives, man pages, and other files. Examples in this chapter use commands and man pages, but they are also applicable to other file types. The alternatives system uses the alternatives directory to collect links to possible alternatives.
When a new package with an alternative is installed, the new alternative is added to the system. Whether the new package's alternative is selected as the default depends on its priority and on the mode that is set.
Usually, packages with a higher version also have a higher priority. The alternatives system can operate in two modes:. Automatic Mode. In this mode, the alternatives system ensures that the links in the group point to the highest priority alternatives appropriate for the group. Manual Mode. In this mode, the alternatives system does not make any changes to the system administrator's settings.
For example, the java command has the following link hierarchy in the alternatives system:. By default, the update-alternatives script is called from inside an RPM package. When a package is installed or removed, the script takes care of all its symbolic links. But you can run it manually from the command line for:. The easiest way to check the alternatives is to follow the symbolic links of your command.
For example, if you want to know what the java command is referring to, use the following command:. To see the full alternatives including slaves , use the --display option:.
0コメント