I use Manjaro operating system I have installed OpenJDK version 11 and 18 (version 11 is installed first) and when I type java --version command in terminal it shows version 11.
java --version
openjdk 11.0.15 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+3)
OpenJDK 64-Bit Server VM (build 11.0.15+3, mixed mode)
How should I change the default Java version? Is it possible to install update-alternatives on Manjaro?
in archlinux based distros you could use archlinux-java
instead of update-alternatives
.
use archlinux-java status
to view the list of installed java versions and default one; then use archlinux-java set <JAVA_ENV>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With