Я хотел изменить версию jdk, используемую Maven, с 1.8 на 11, используя alternatives
на fedora.
$ mvn -version
Apache Maven 3.5.4 (Red Hat 3.5.4-4)
Maven home: /usr/share/maven
Java version: 1.8.0_232, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.fc29.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.18.16-300.fc29.x86_64", arch: "amd64", family: "unix"
У меня есть 3 установленных версии java:
$ sudo alternatives --config java
[sudo] password for axione:
There are 3 programs which provide 'java'.
Selection Command
-----------------------------------------------
1 java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.5.10-0.fc29.x86_64/bin/java)
2 java-latest-openjdk.x86_64 (/usr/lib/jvm/java-13-openjdk-13.0.1.9-2.rolling.fc29.x86_64/bin/java)
*+ 3 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.fc29.x86_64/jre/bin/java)